public abstract class SessionIdGeneratorBase extends LifecycleBase implements SessionIdGenerator
Lifecycle.SingleUseAFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT| Constructor and Description | 
|---|
| SessionIdGeneratorBase() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | destroyInternal()Sub-classes implement this method to perform any instance destruction
 required. | 
| String | generateSessionId()Generate and return a new session identifier. | 
| String | getJvmRoute()Return the node identifier associated with this node which will be
 included in the generated session ID. | 
| protected void | getRandomBytes(byte[] bytes) | 
| int | getSessionIdLength()Return the number of bytes for a session ID | 
| protected void | initInternal()Sub-classes implement this method to perform any instance initialisation
 required. | 
| void | setJvmRoute(String jvmRoute)Specify the node identifier associated with this node which will be
 included in the generated session ID. | 
| void | setSecureRandomAlgorithm(String secureRandomAlgorithm)Specify a non-default algorithm to use to generate random numbers. | 
| void | setSecureRandomClass(String secureRandomClass)Specify a non-default @{link  SecureRandomimplementation to use. | 
| void | setSecureRandomProvider(String secureRandomProvider)Specify a non-default provider to use to generate random numbers. | 
| void | setSessionIdLength(int sessionIdLength)Specify the number of bytes for a session ID | 
| protected void | startInternal()Sub-classes must ensure that the state is changed to
  LifecycleState.STARTINGduring the execution of this method. | 
| protected void | stopInternal()Sub-classes must ensure that the state is changed to
  LifecycleState.STOPPINGduring the execution of this method. | 
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerateSessionIdpublic void setSecureRandomClass(String secureRandomClass)
SecureRandom implementation to use.secureRandomClass - The fully-qualified class namepublic void setSecureRandomAlgorithm(String secureRandomAlgorithm)
secureRandomAlgorithm - The name of the algorithmpublic void setSecureRandomProvider(String secureRandomProvider)
secureRandomProvider - The name of the providerpublic String getJvmRoute()
getJvmRoute in interface SessionIdGeneratorpublic void setJvmRoute(String jvmRoute)
setJvmRoute in interface SessionIdGeneratorjvmRoute - The node identifierpublic int getSessionIdLength()
getSessionIdLength in interface SessionIdGeneratorpublic void setSessionIdLength(int sessionIdLength)
setSessionIdLength in interface SessionIdGeneratorsessionIdLength - Number of bytespublic String generateSessionId()
generateSessionId in interface SessionIdGeneratorprotected void getRandomBytes(byte[] bytes)
protected void initInternal()
                     throws LifecycleException
LifecycleBaseinitInternal in class LifecycleBaseLifecycleException - If the initialisation failsprotected void startInternal()
                      throws LifecycleException
LifecycleBaseLifecycleState.STARTING during the execution of this method.
 Changing state will trigger the Lifecycle.START_EVENT event.
 If a component fails to start it may either throw a
 LifecycleException which will cause it's parent to fail to start
 or it can place itself in the error state in which case LifecycleBase.stop()
 will be called on the failed component but the parent component will
 continue to start normally.startInternal in class LifecycleBaseLifecycleException - Start error occurredprotected void stopInternal()
                     throws LifecycleException
LifecycleBaseLifecycleState.STOPPING during the execution of this method.
 Changing state will trigger the Lifecycle.STOP_EVENT event.stopInternal in class LifecycleBaseLifecycleException - Stop error occurredprotected void destroyInternal()
                        throws LifecycleException
LifecycleBasedestroyInternal in class LifecycleBaseLifecycleException - If the destruction failsCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.