public interface SessionToken
extends java.io.Serializable
getSessionID()) as
well as a UUID specific for the token (getChildSessionID()). This
allows to either lock and synchronise on a session token hierarchy or on a
single session token.
Session tokens carry a security token for identifying the user and the corresponding rights. Security tokens are created when the user has successfully logged on and they are encapsulated by session token factories. They are always signed with the private key of the security manager. This ensures their integrity. It is always checked against the public key of the security manager when accessing the security token.
A session token is used like a transaction in a database management system, and has nothing to do with a user session, for instance a session in a web browser. The latter corresponds to a session factory in ADEPT2. This is retrieved when logging on and used until logging off.
Session tokens are serialisable lightweight objects which can be created
arbitrarily. This requires to overwrite Object.equals(Object) and
Object.hashCode() in the implementation. A nice string representation
Object.toString() is also very useful, for instance for
LockExceptions.
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
Generated ID for serialisation.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAdditionalAttributeValue(java.lang.String attributeName)
Returns the value of the additional attribute set when the token has been
created.
|
java.net.URI[] |
getCallingComponent()
Gets communication protocol depended references to the ADEPT2-component
which has initiated this session, for instance, ADEPT2Editor,
ExecutionManager, ...
|
java.net.URI[] |
getChildCallingComponent()
Gets the URIs for the component which has created this subsession.
|
int |
getChildLevel()
Gets the level of the child, 0 is the parent session.
|
java.util.UUID |
getChildSessionID()
Gets the ID to uniquely identify the child session-token.
|
SignedSecurityToken |
getSecurityToken()
Gets the security token (signed) which identifies the user for this
session.
|
java.util.UUID |
getSessionID()
Gets the ID to uniquely identify the session token hierarchy.
|
SignedSecurityToken |
getTopLevelSecurityToken()
Gets the security token (signed) of the top-level parent session token of
this session token.
|
boolean |
isAncestorSession(SessionToken session)
Gets whether the designated session is a transitive parent session of this
session.
|
static final long serialVersionUID
java.util.UUID getSessionID()
java.util.UUID getChildSessionID()
getSessionID().int getChildLevel()
boolean isAncestorSession(SessionToken session)
session - The session token which to check for whether it is a
transitive parent session of this session.SignedSecurityToken getSecurityToken()
SignedSecurityToken getTopLevelSecurityToken()
java.net.URI[] getCallingComponent()
java.net.URI[] getChildCallingComponent()
getCallingComponent().java.lang.String getAdditionalAttributeValue(java.lang.String attributeName)
null will be returned.attributeName - The name of the additional attribute.null in case
the attribute does not exist (or it is deliberately null).