public abstract class SessionIdGeneratorBase extends AbstractSessionIDGenerator
| 构造器和说明 |
|---|
SessionIdGeneratorBase() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract SessionID |
generateID()
Generate and return a new session identifier.
|
protected void |
getRandomBytes(byte[] bytes) |
java.lang.String |
getSecureRandomAlgorithm()
Get the name of the algorithm used to create the
SecureRandom
instances which generate new session IDs. |
java.lang.String |
getSecureRandomClass()
Get the class name of the
SecureRandom implementation used to
generate session IDs. |
java.lang.String |
getSecureRandomProvider()
Get the name of the provider used to create the
SecureRandom
instances which generate new session IDs. |
int |
getSessionIdLength()
Return the number of bytes for a session ID
|
void |
setSecureRandomAlgorithm(java.lang.String secureRandomAlgorithm)
Specify a non-default algorithm to use to create instances of
SecureRandom which are used to generate session IDs. |
void |
setSecureRandomClass(java.lang.String secureRandomClass)
Specify a non-default
SecureRandom implementation to use. |
void |
setSecureRandomProvider(java.lang.String secureRandomProvider)
Specify a non-default provider to use to create instances of
SecureRandom which are used to generate session IDs. |
void |
setSessionIdLength(int sessionIdLength)
Specify the number of bytes for a session ID
|
public java.lang.String getSecureRandomClass()
SecureRandom implementation used to
generate session IDs.null indicates that the
JRE provided SecureRandom implementation will be usedpublic void setSecureRandomClass(java.lang.String secureRandomClass)
SecureRandom implementation to use. The
implementation must be self-seeding and have a zero-argument constructor.
If not specified, an instance of SecureRandom will be generated.secureRandomClass - The fully-qualified class namepublic java.lang.String getSecureRandomAlgorithm()
SecureRandom
instances which generate new session IDs.null or the empty string means
that platform default will be usedpublic void setSecureRandomAlgorithm(java.lang.String secureRandomAlgorithm)
SecureRandom which are used to generate session IDs. If no
algorithm is specified, SHA1PRNG is used. To use the platform default
(which may be SHA1PRNG), specify null or the empty string. If an
invalid algorithm and/or provider is specified the SecureRandom
instances will be created using the defaults for this
SessionIdGenerator implementation. If that fails, the
SecureRandom instances will be created using platform defaults.secureRandomAlgorithm - The name of the algorithmpublic java.lang.String getSecureRandomProvider()
SecureRandom
instances which generate new session IDs.null or the empty string means
that platform default will be usedpublic void setSecureRandomProvider(java.lang.String secureRandomProvider)
SecureRandom which are used to generate session IDs. If no
provider is specified, the platform default is used. To use the platform
default specify null or the empty string. If an invalid algorithm
and/or provider is specified the SecureRandom instances will be
created using the defaults for this SessionIdGenerator
implementation. If that fails, the SecureRandom instances will be
created using platform defaults.secureRandomProvider - The name of the providerpublic int getSessionIdLength()
public void setSessionIdLength(int sessionIdLength)
sessionIdLength - Number of bytespublic abstract SessionID generateID()
protected void getRandomBytes(byte[] bytes)