Class CXFJCacheReplayCache
- java.lang.Object
-
- org.apache.cxf.ws.security.cache.jcache.CXFJCacheReplayCache
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.cxf.buslifecycle.BusLifeCycleListener,org.apache.wss4j.common.cache.ReplayCache
public class CXFJCacheReplayCache extends Object implements org.apache.cxf.buslifecycle.BusLifeCycleListener
Wrap the default JCacheReplayCache in a BusLifeCycleListener, to make sure that the cache is shutdown correctly.
-
-
Constructor Summary
Constructors Constructor Description CXFJCacheReplayCache(String key, org.apache.cxf.Bus bus)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String identifier)Add the given identifier to the cache.voidadd(String identifier, Instant expiry)Add the given identifier to the cache to be cached for the given timevoidclose()booleancontains(String identifier)Return true if the given identifier is contained in the cachevoidinitComplete()voidpostShutdown()voidpreShutdown()
-
-
-
Constructor Detail
-
CXFJCacheReplayCache
public CXFJCacheReplayCache(String key, org.apache.cxf.Bus bus) throws org.apache.wss4j.common.ext.WSSecurityException
- Throws:
org.apache.wss4j.common.ext.WSSecurityException
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
add
public void add(String identifier)
Add the given identifier to the cache. It will be cached for a default amount of time.- Specified by:
addin interfaceorg.apache.wss4j.common.cache.ReplayCache- Parameters:
identifier- The identifier to be added
-
add
public void add(String identifier, Instant expiry)
Add the given identifier to the cache to be cached for the given time- Specified by:
addin interfaceorg.apache.wss4j.common.cache.ReplayCache- Parameters:
identifier- The identifier to be addedexpiry- A custom expiry time for the identifier. Can be null in which case, the default expiry is used.
-
contains
public boolean contains(String identifier)
Return true if the given identifier is contained in the cache- Specified by:
containsin interfaceorg.apache.wss4j.common.cache.ReplayCache- Parameters:
identifier- The identifier to check
-
initComplete
public void initComplete()
-
preShutdown
public void preShutdown()
-
postShutdown
public void postShutdown()
-
-