public class AddAttrSessionFactory extends java.lang.Object implements ClientSessionFactory
| Constructor and Description |
|---|
AddAttrSessionFactory(ClientSessionFactory csf,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Creates a new
ClientSessionFactory which adds the designated
additional attributes to all created session tokens. |
| 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.
|
boolean |
subEquals(java.lang.Object obj)
An implementation of
Object.equals(Object) for various purpose. |
int |
subHashCode()
An implementation of
Object.hashCode() for various purpose. |
public AddAttrSessionFactory(ClientSessionFactory csf, java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
ClientSessionFactory which adds the designated
additional attributes to all created session tokens.csf - The client session factory used to create session tokens.additionalAttributes - The additional attributes added to every
created session token (complemented by provided additional
attributes if appropriate).public RichAgent getAuthenticatedAgent()
ClientSessionFactoryRichAgent which is authenticated for this client
session factory.getAuthenticatedAgent in interface ClientSessionFactoryRichAgent authenticated for this client session
factory.public void setClientURIs(java.net.URI[] clientURIs)
ClientSessionFactoryClientSessionFactory.getSessionToken()
and it must not be called more than once! Further calls are ignored. setClientURIs in interface ClientSessionFactoryclientURIs - The URIs of the client used if a component does not have
its own URIs. This must not be null.public SessionToken getSessionToken(java.net.URI[] callingComponent)
ClientSessionFactorygetSessionToken in interface ClientSessionFactorycallingComponent - The component initiating the requested session on
the client side, identified by its communication protocol depended
URIs.public SessionToken getSessionToken(java.net.URI[] callingComponent, java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
ClientSessionFactorygetSessionToken in interface ClientSessionFactorycallingComponent - 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.public SessionToken getSessionToken()
ClientSessionFactory
Before calling this method, ClientSessionFactory.setClientURIs(URI[]) has to be called.
Otherwise an IllegalStateException will be thrown.
getSessionToken in interface ClientSessionFactorypublic SessionToken getSessionToken(java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
ClientSessionFactory
Before calling this method, ClientSessionFactory.setClientURIs(URI[]) has to be called.
Otherwise an IllegalStateException will be thrown.
getSessionToken in interface ClientSessionFactoryadditionalAttributes - Additional attributes which are provided by the
created session token. This may be null.public boolean subEquals(java.lang.Object obj)
Object.equals(Object) for various purpose. Due to
several reasons we do not want actually override Object.equals(Object).obj - The object with which to compare.public int subHashCode()
Object.hashCode() for various purpose. Due to
several reasons we do not want actually override
Object.hashCode(). subEquals(Object) with respect to Object.equals(Object).