| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| private String | jvmRoute
Node identifier when in a cluster. |
| private final Log | |
| private final Queue | randoms
Queue of random number generator objects to be used when creating session identifiers. |
| private String | |
| private String | |
| private String | |
| private int | sessionIdLength
Number of bytes in a session ID. Defaults to 16. |
| private static final StringManager |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private SecureRandom | createSecureRandom()
Create a new random number generator instance we should use for generating session identifiers. |
| protected void | destroyInternal()
Implements abstract org. Sub-classes implement this method to perform any instance destruction required. |
| public String | generateSessionId()
Implements org. Generate and return a new session identifier. |
| public String | getJvmRoute()
Implements org. Return the node identifier associated with this node which will be included in the generated session ID. |
| protected void | |
| public String | Returns: The name of the algorithm.null or the empty string means
that platform default will be usedGet the name of the algorithm used to create the |
| public String | Returns: The fully qualified class name.null indicates that the
JRE provided SecureRandom implementation will be usedGet the class name of the |
| public String | Returns: The name of the provider.null or the empty string means
that platform default will be usedGet the name of the provider used to create the |
| public int | getSessionIdLength()
Implements org. Return the number of bytes for a session ID |
| protected void | initInternal()
Implements abstract org. Sub-classes implement this method to perform any instance initialisation required. |
| public void | setJvmRoute(String
The node identifier jvmRoute)Implements org. Specify the node identifier associated with this node which will be included in the generated session ID. |
| public void | setSecureRandomAlgorithm(String
The name of the algorithm secureRandomAlgorithm)Specify a non-default algorithm to use to create instances of
|
| public void | setSecureRandomClass(String
The fully-qualified class name secureRandomClass)Specify a non-default |
| public void | setSecureRandomProvider(String
The name of the provider secureRandomProvider)Specify a non-default provider to use to create instances of
|
| public void | setSessionIdLength(int
Number of bytes sessionIdLength)Implements org. Specify the number of bytes for a session ID |
| protected void | startInternal()
Implements abstract org. Sub-classes must ensure that the state is changed to
|
| protected void | stopInternal()
Implements abstract org. Sub-classes must ensure that the state is changed to
|
| DEFAULT_SECURE_RANDOM_ALGORITHM | back to summary |
|---|---|
| public static final String DEFAULT_SECURE_RANDOM_ALGORITHM | |
| jvmRoute | back to summary |
|---|---|
| private String jvmRoute Node identifier when in a cluster. Defaults to the empty string. | |
| log | back to summary |
|---|---|
| private final Log log | |
| randoms | back to summary |
|---|---|
| private final Queue<SecureRandom> randoms Queue of random number generator objects to be used when creating session identifiers. If the queue is empty when a random number generator is required, a new random number generator object is created. This is designed this way since random number generators use a sync to make them thread-safe and the sync makes using a single object slow(er). | |
| secureRandomAlgorithm | back to summary |
|---|---|
| private String secureRandomAlgorithm | |
| secureRandomClass | back to summary |
|---|---|
| private String secureRandomClass | |
| secureRandomProvider | back to summary |
|---|---|
| private String secureRandomProvider | |
| sessionIdLength | back to summary |
|---|---|
| private int sessionIdLength Number of bytes in a session ID. Defaults to 16. | |
| sm | back to summary |
|---|---|
| private static final StringManager sm | |
| SessionIdGeneratorBase | back to summary |
|---|---|
| public SessionIdGeneratorBase() | |
| createSecureRandom | back to summary |
|---|---|
| private SecureRandom createSecureRandom() Create a new random number generator instance we should use for generating session identifiers. | |
| destroyInternal | back to summary |
|---|---|
| protected void destroyInternal() throws LifecycleException Implements abstract org. Doc from org. Sub-classes implement this method to perform any instance destruction required.
| |
| generateSessionId | back to summary |
|---|---|
| public String generateSessionId() Implements org. Generate and return a new session identifier.
| |
| getJvmRoute | back to summary |
|---|---|
| public String getJvmRoute() Implements org. Return the node identifier associated with this node which will be included in the generated session ID.
| |
| getRandomBytes | back to summary |
|---|---|
| protected void getRandomBytes(byte[] bytes) | |
| getSecureRandomAlgorithm | back to summary |
|---|---|
| public String getSecureRandomAlgorithm() Get the name of the algorithm used to create the
| |
| getSecureRandomClass | back to summary |
|---|---|
| public String getSecureRandomClass() Get the class name of the
| |
| getSecureRandomProvider | back to summary |
|---|---|
| public String getSecureRandomProvider() Get the name of the provider used to create the
| |
| getSessionIdLength | back to summary |
|---|---|
| public int getSessionIdLength() Implements org. Return the number of bytes for a session ID
| |
| initInternal | back to summary |
|---|---|
| protected void initInternal() throws LifecycleException Implements abstract org. Doc from org. Sub-classes implement this method to perform any instance initialisation required.
| |
| setJvmRoute | back to summary |
|---|---|
| public void setJvmRoute(String jvmRoute) Implements org. Specify the node identifier associated with this node which will be included in the generated session ID. | |
| setSecureRandomAlgorithm | back to summary |
|---|---|
| public void setSecureRandomAlgorithm(String secureRandomAlgorithm) Specify a non-default algorithm to use to create instances of
| |
| setSecureRandomClass | back to summary |
|---|---|
| public void setSecureRandomClass(String secureRandomClass) Specify a non-default
| |
| setSecureRandomProvider | back to summary |
|---|---|
| public void setSecureRandomProvider(String secureRandomProvider) Specify a non-default provider to use to create instances of
| |
| setSessionIdLength | back to summary |
|---|---|
| public void setSessionIdLength(int sessionIdLength) Implements org. Specify the number of bytes for a session ID
| |
| startInternal | back to summary |
|---|---|
| protected void startInternal() throws LifecycleException Implements abstract org. Doc from org. Sub-classes must ensure that the state is changed to
| |
| stopInternal | back to summary |
|---|---|
| protected void stopInternal() throws LifecycleException Implements abstract org. Doc from org. Sub-classes must ensure that the state is changed to
| |