Package org.apache.cxf.sts.cache
Class HazelCastTokenStore
- java.lang.Object
-
- org.apache.cxf.sts.cache.HazelCastTokenStore
-
- All Implemented Interfaces:
org.apache.cxf.ws.security.tokenstore.TokenStore
public class HazelCastTokenStore extends Object implements org.apache.cxf.ws.security.tokenstore.TokenStore
-
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_TTLstatic longMAX_TTL
-
Constructor Summary
Constructors Constructor Description HazelCastTokenStore(String mapName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(String identifier, org.apache.cxf.ws.security.tokenstore.SecurityToken token)voidadd(org.apache.cxf.ws.security.tokenstore.SecurityToken token)voiddestroy()com.hazelcast.core.HazelcastInstancegetHazelcastInstance()Get the Hazelcast instanceorg.apache.cxf.ws.security.tokenstore.SecurityTokengetToken(String identifier)Collection<String>getTokenIdentifiers()longgetTTL()Get the (default) TTL value in secondsvoidremove(String identifier)voidsetHazelcastInstance(com.hazelcast.core.HazelcastInstance hazelcastInstance)Set the Hazelcast instance, otherwise default instance used If you configure Hazelcast instance in spring, you must inject the instance here.voidsetTTL(long newTtl)Set a new (default) TTL value in seconds
-
-
-
Field Detail
-
DEFAULT_TTL
public static final long DEFAULT_TTL
- See Also:
- Constant Field Values
-
MAX_TTL
public static final long MAX_TTL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HazelCastTokenStore
public HazelCastTokenStore(String mapName)
-
-
Method Detail
-
getHazelcastInstance
public com.hazelcast.core.HazelcastInstance getHazelcastInstance()
Get the Hazelcast instance- Returns:
- Hazelcast instance
-
setHazelcastInstance
public void setHazelcastInstance(com.hazelcast.core.HazelcastInstance hazelcastInstance)
Set the Hazelcast instance, otherwise default instance used If you configure Hazelcast instance in spring, you must inject the instance here.- Parameters:
hazelcastInstance- Hazelcast instance
-
setTTL
public void setTTL(long newTtl)
Set a new (default) TTL value in seconds- Parameters:
newTtl- a new (default) TTL value in seconds
-
getTTL
public long getTTL()
Get the (default) TTL value in seconds- Returns:
- the (default) TTL value in seconds
-
add
public void add(org.apache.cxf.ws.security.tokenstore.SecurityToken token)
- Specified by:
addin interfaceorg.apache.cxf.ws.security.tokenstore.TokenStore
-
add
public void add(String identifier, org.apache.cxf.ws.security.tokenstore.SecurityToken token)
- Specified by:
addin interfaceorg.apache.cxf.ws.security.tokenstore.TokenStore
-
remove
public void remove(String identifier)
- Specified by:
removein interfaceorg.apache.cxf.ws.security.tokenstore.TokenStore
-
getTokenIdentifiers
public Collection<String> getTokenIdentifiers()
- Specified by:
getTokenIdentifiersin interfaceorg.apache.cxf.ws.security.tokenstore.TokenStore
-
getToken
public org.apache.cxf.ws.security.tokenstore.SecurityToken getToken(String identifier)
- Specified by:
getTokenin interfaceorg.apache.cxf.ws.security.tokenstore.TokenStore
-
destroy
public void destroy()
-
-