Apache CXF API

org.apache.cxf.rs.security.saml.sso.state
Class EHCacheSPStateManager

java.lang.Object
  extended by org.apache.cxf.rs.security.saml.sso.state.EHCacheSPStateManager
All Implemented Interfaces:
Closeable, SPStateManager

public class EHCacheSPStateManager
extends Object
implements SPStateManager

An in-memory EHCache implementation of the SPStateManager interface. The default TTL is 5 minutes.


Field Summary
static long DEFAULT_TTL
           
static String REQUEST_CACHE_KEY
           
static String RESPONSE_CACHE_KEY
           
 
Constructor Summary
EHCacheSPStateManager()
           
EHCacheSPStateManager(Bus bus)
           
EHCacheSPStateManager(String configFileURL)
           
EHCacheSPStateManager(String configFileURL, Bus bus)
           
 
Method Summary
 void close()
           
 ResponseState getResponseState(String securityContextKey)
           
 long getTTL()
          Get the (default) TTL value in seconds
 RequestState removeRequestState(String relayState)
           
 ResponseState removeResponseState(String securityContextKey)
           
 void setRequestState(String relayState, RequestState state)
           
 void setResponseState(String securityContextKey, ResponseState state)
           
 void setTTL(long newTtl)
          Set a new (default) TTL value in seconds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TTL

public static final long DEFAULT_TTL
See Also:
Constant Field Values

REQUEST_CACHE_KEY

public static final String REQUEST_CACHE_KEY
See Also:
Constant Field Values

RESPONSE_CACHE_KEY

public static final String RESPONSE_CACHE_KEY
See Also:
Constant Field Values
Constructor Detail

EHCacheSPStateManager

public EHCacheSPStateManager()

EHCacheSPStateManager

public EHCacheSPStateManager(Bus bus)

EHCacheSPStateManager

public EHCacheSPStateManager(String configFileURL)

EHCacheSPStateManager

public EHCacheSPStateManager(String configFileURL,
                             Bus bus)
Method Detail

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

getResponseState

public ResponseState getResponseState(String securityContextKey)
Specified by:
getResponseState in interface SPStateManager

removeResponseState

public ResponseState removeResponseState(String securityContextKey)
Specified by:
removeResponseState in interface SPStateManager

setResponseState

public void setResponseState(String securityContextKey,
                             ResponseState state)
Specified by:
setResponseState in interface SPStateManager

setRequestState

public void setRequestState(String relayState,
                            RequestState state)
Specified by:
setRequestState in interface SPStateManager

removeRequestState

public RequestState removeRequestState(String relayState)
Specified by:
removeRequestState in interface SPStateManager

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in interface SPStateManager
Throws:
IOException

Apache CXF API

Apache CXF