|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.clicktoconnect.C2CTokenGenerator
public class C2CTokenGenerator
This class generates unique tokens that can be used to indentify individual connections.
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static char |
ENCODING_PAD
|
static char[] |
ENCODING_REPLACEMENTS
|
static java.lang.String |
TOKEN_DELIMITER
|
static int |
TOKEN_DELIMITER_COUNT
|
| Fields inherited from class atg.nucleus.GenericService |
|---|
SERVICE_INFO_KEY |
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
|---|
DEFAULT_LOG_TRACE_STATUS |
| Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
|---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
| Constructor Summary | |
|---|---|
C2CTokenGenerator()
|
|
| Method Summary | |
|---|---|
void |
doStartService()
Perform one-time startup operations |
protected java.lang.String |
generateChecksum(java.lang.String pToken)
Generates a checksum for a token. |
java.lang.String |
generateToken()
Generates a unique token that can be used to identify a connection. |
java.lang.String |
getAlgorithm()
Returns the name of the digest algorithm used to detect tampering. |
long |
getAndIncrementConnectionCounter()
Returns the next number in a sequence, guaranteeing never to return the same number twice. |
C2CManager |
getClickToConnectManager()
|
java.lang.String |
getHashKey()
Returns the hash key to use to prevent tampering with connection tokens. |
java.lang.String |
getTokenPrefix()
Returns the server instance and session portions of a connection token pre-assembled for the current session |
void |
setAlgorithm(java.lang.String pAlgorithm)
Changes the name of the digest algorithm used to detect tampering. |
void |
setClickToConnectManager(C2CManager pClickToConnectManager)
The component that manages ClickToConnect sessions |
void |
setHashKey(java.lang.String pHashKey)
Sets the hash key to use to prevent tampering with connection tokens. |
void |
setTokenPrefix(java.lang.String pTokenPrefix)
Sets the server instance and session portions of a connection token pre-assembled for the current session |
boolean |
validateToken(java.lang.String pToken)
Validates a candidate connection token. |
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
|---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CLASS_VERSION
public static final java.lang.String TOKEN_DELIMITER
public static final int TOKEN_DELIMITER_COUNT
public static final char ENCODING_PAD
public static final char[] ENCODING_REPLACEMENTS
| Constructor Detail |
|---|
public C2CTokenGenerator()
| Method Detail |
|---|
public java.lang.String getAlgorithm()
public void setAlgorithm(java.lang.String pAlgorithm)
pAlgorithm - the algorithm namepublic C2CManager getClickToConnectManager()
public void setClickToConnectManager(C2CManager pClickToConnectManager)
pClickToConnectManager - the management componentpublic java.lang.String getHashKey()
public void setHashKey(java.lang.String pHashKey)
pHashKey - the hash keypublic java.lang.String getTokenPrefix()
public void setTokenPrefix(java.lang.String pTokenPrefix)
pTokenPrefix - the token prefix for the current sessionpublic java.lang.String generateToken()
public long getAndIncrementConnectionCounter()
public boolean validateToken(java.lang.String pToken)
pToken - the token to be validated
true if the token is valid, false if invalidprotected java.lang.String generateChecksum(java.lang.String pToken)
pToken - the token to be checksummed
public void doStartService()
throws ServiceException
doStartService in class GenericServiceServiceException - if the Service had a problem starting up
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||