public interface ClientSessionFactory
extends java.io.Serializable
While a session token is used like a transaction in a database management system, a session factory corresponds to a user session, for instance in a web browser. A session factory is retrieved when logging on and may be used until logging off. Every request or a combination or requests belonging together in one transaction are performed with the same session token of the provided session factory (user session).
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
Generated ID for serialisation.
|
| Modifier and Type | Method and Description |
|---|---|
RichAgent |
getAuthenticatedAgent()
Gets the
RichAgent which is authenticated for this client
session factory. |
SessionToken |
getSessionToken()
Creates a new (top-level) session token which is needed for calling the
ADEPT2-API.
|
SessionToken |
getSessionToken(java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Creates a new (top-level) session token which is needed for calling the
ADEPT2-API.
|
SessionToken |
getSessionToken(java.net.URI[] callingComponent)
Creates a new (top-level) session token which is needed for calling the
ADEPT2-API.
|
SessionToken |
getSessionToken(java.net.URI[] callingComponent,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Creates a new (top-level) session token which is needed for calling the
ADEPT2-API.
|
void |
setClientURIs(java.net.URI[] clientURIs)
Sets the URIs to be used when creating a session token without explicit
URIs.
|
static final long serialVersionUID
RichAgent getAuthenticatedAgent()
RichAgent which is authenticated for this client
session factory.RichAgent authenticated for this client session
factory.void setClientURIs(java.net.URI[] clientURIs)
getSessionToken()
and it must not be called more than once! Further calls are ignored. clientURIs - The URIs of the client used if a component does not have
its own URIs. This must not be null.SessionToken getSessionToken(java.net.URI[] callingComponent)
callingComponent - The component initiating the requested session on
the client side, identified by its communication protocol depended
URIs.SessionToken getSessionToken(java.net.URI[] callingComponent, java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
callingComponent - The component initiating the requested session on
the client side, identified by its communication protocol depended
URIs.additionalAttributes - Additional attributes which are provided by the
created session token. This may be null.SessionToken getSessionToken()
Before calling this method, setClientURIs(URI[]) has to be called.
Otherwise an IllegalStateException will be thrown.
java.lang.IllegalStateException - If the URIs are
not set yet an
IllegalStateException will be thrown.SessionToken getSessionToken(java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Before calling this method, setClientURIs(URI[]) has to be called.
Otherwise an IllegalStateException will be thrown.
additionalAttributes - Additional attributes which are provided by the
created session token. This may be null.java.lang.IllegalStateException - If the URIs are
not set yet an
IllegalStateException will be thrown.