org.apache.cxf.sts.cache
Class MemoryIdentityCache
java.lang.Object
org.apache.cxf.sts.cache.MemoryIdentityCache
- All Implemented Interfaces:
- ManagedComponent, IdentityCache, IdentityMapper
@ManagedResource
public class MemoryIdentityCache
- extends Object
- implements IdentityCache, IdentityMapper, ManagedComponent
A simple in-memory HashMap based cache to cache identities in different realms where
the relationship is of type FederateIdentity.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryIdentityCache
protected MemoryIdentityCache()
MemoryIdentityCache
public MemoryIdentityCache(IdentityMapper identityMapper)
MemoryIdentityCache
public MemoryIdentityCache(Bus bus,
IdentityMapper identityMapper)
getStatistics
public MemoryIdentityCacheStatistics getStatistics()
setStatistics
public void setStatistics(MemoryIdentityCacheStatistics stats)
getMaxCacheItems
public long getMaxCacheItems()
setMaxCacheItems
public void setMaxCacheItems(long maxCacheItems)
add
public void add(String user,
String realm,
Map<String,String> identities)
- Specified by:
add
in interface IdentityCache
get
@ManagedOperation
public Map<String,String> get(String user,
String realm)
- Specified by:
get
in interface IdentityCache
remove
public void remove(String user,
String realm)
- Specified by:
remove
in interface IdentityCache
clear
@ManagedOperation
public void clear()
- Specified by:
clear
in interface IdentityCache
size
@ManagedOperation
public int size()
- Specified by:
size
in interface IdentityCache
getContent
@ManagedOperation
public String getContent()
mapPrincipal
public Principal mapPrincipal(String sourceRealm,
Principal sourcePrincipal,
String targetRealm)
- Description copied from interface:
IdentityMapper
- Map a principal in the source realm to the target realm
- Specified by:
mapPrincipal
in interface IdentityMapper
- Parameters:
sourceRealm
- the source realm of the PrincipalsourcePrincipal
- the principal in the source realmtargetRealm
- the target realm of the Principal
- Returns:
- the principal in the target realm
getObjectName
public ObjectName getObjectName()
throws JMException
- Specified by:
getObjectName
in interface ManagedComponent
- Throws:
JMException
Apache CXF