|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensaml.util.storage.ReplayCache
public class ReplayCache
Class that uses an underlying StorageService
to track information associated with messages in order to detect
message replays.
This class is thread-safe and uses a basic reentrant lock to avoid corruption of the underlying store, as
well as to prevent race conditions with respect to replay checking.
Nested Class Summary | |
---|---|
class |
ReplayCache.ReplayCacheEntry
Replay cache storage service entry. |
Constructor Summary | |
---|---|
ReplayCache(StorageService<java.lang.String,ReplayCache.ReplayCacheEntry> storageService,
long duration)
Constructor. |
Method Summary | |
---|---|
protected void |
addMessageID(java.lang.String messageId,
org.joda.time.DateTime expiration)
Accquires a write lock and adds the message state to the underlying storage service. |
boolean |
isReplay(java.lang.String messageId)
Checks if the message has been replayed. |
boolean |
isReplay(java.lang.String messageId,
org.joda.time.DateTime expiration)
Checks if the message has been replayed. |
boolean |
isReplay(java.lang.String messageId,
long duration)
Checks if the message has been replayed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReplayCache(StorageService<java.lang.String,ReplayCache.ReplayCacheEntry> storageService, long duration)
storageService
- the StorageService which serves as the backing store for the cacheduration
- default length of time that message state is validMethod Detail |
---|
public boolean isReplay(java.lang.String messageId)
messageId
- unique ID of the message
public boolean isReplay(java.lang.String messageId, long duration)
messageId
- unique ID of the messageduration
- length of time, in milliseconds, to keep the message state
public boolean isReplay(java.lang.String messageId, org.joda.time.DateTime expiration)
messageId
- unique ID of the messageexpiration
- time the message state expires
protected void addMessageID(java.lang.String messageId, org.joda.time.DateTime expiration)
messageId
- unique ID of the messageexpiration
- time the message state expires
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |