Package org.apache.cxf.sts.cache
Class EHCacheIdentityCache
- java.lang.Object
-
- org.apache.cxf.sts.cache.AbstractIdentityCache
-
- org.apache.cxf.sts.cache.EHCacheIdentityCache
-
- All Implemented Interfaces:
Closeable,AutoCloseable,BusLifeCycleListener,ManagedComponent,IdentityCache,IdentityMapper
@ManagedResource public class EHCacheIdentityCache extends AbstractIdentityCache implements Closeable, BusLifeCycleListener
A EH-Cache based cache to cache identities in different realms where the relationship is of type FederateIdentity.
-
-
Constructor Summary
Constructors Constructor Description EHCacheIdentityCache(IdentityMapper identityMapper, String key, Bus b, URL configFileURL)EHCacheIdentityCache(IdentityMapper identityMapper, Bus b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String user, String realm, Map<String,String> identities)voidclose()Map<String,String>get(String user, String realm)StringgetContent()ObjectNamegetObjectName()voidinitComplete()Invoked when theBushas been initialized.voidpostShutdown()Invoked after theBusis shutdown.voidpreShutdown()Invoked before theBusis shutdown.voidremove(String user, String realm)-
Methods inherited from class org.apache.cxf.sts.cache.AbstractIdentityCache
getBus, getStatistics, mapPrincipal, setStatistics
-
-
-
-
Constructor Detail
-
EHCacheIdentityCache
public EHCacheIdentityCache(IdentityMapper identityMapper, Bus b)
-
EHCacheIdentityCache
public EHCacheIdentityCache(IdentityMapper identityMapper, String key, Bus b, URL configFileURL)
-
-
Method Detail
-
add
public void add(String user, String realm, Map<String,String> identities)
- Specified by:
addin interfaceIdentityCache
-
get
@ManagedOperation public Map<String,String> get(String user, String realm)
- Specified by:
getin interfaceIdentityCache
-
remove
public void remove(String user, String realm)
- Specified by:
removein interfaceIdentityCache
-
getContent
@ManagedOperation public String getContent()
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
initComplete
public void initComplete()
Description copied from interface:BusLifeCycleListenerInvoked when theBushas been initialized.- Specified by:
initCompletein interfaceBusLifeCycleListener
-
preShutdown
public void preShutdown()
Description copied from interface:BusLifeCycleListenerInvoked before theBusis shutdown.- Specified by:
preShutdownin interfaceBusLifeCycleListener
-
postShutdown
public void postShutdown()
Description copied from interface:BusLifeCycleListenerInvoked after theBusis shutdown.- Specified by:
postShutdownin interfaceBusLifeCycleListener
-
getObjectName
public ObjectName getObjectName() throws JMException
- Specified by:
getObjectNamein interfaceManagedComponent- Throws:
JMException
-
-