public class UserSessionIDCallback
extends java.lang.Object
implements javax.security.auth.callback.Callback, java.io.Serializable
UnsupportedCallbackException. OrgPositionChoiceCallback and therefore does not reflect the
selection of the organisational position(s). It is not necessary to set a
user session ID for all agents of this callback.| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<QualifiedAgent> |
agents
The agents for which to retrieve user session IDs.
|
protected java.util.HashMap<QualifiedAgent,java.lang.String> |
sessionIDs
The session IDs indexed by the corresponding agent.
|
| Constructor and Description |
|---|
UserSessionIDCallback(java.util.List<QualifiedAgent> agents)
Creates a new callback for retrieving user session IDs for session tokens
for the designated agents.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<QualifiedAgent> |
getAgents()
Gets the
QualifiedAgents for which to retrieve user session
IDs. |
java.lang.String |
getUserSessionID(QualifiedAgent agent)
Gets the user session ID for the designated agent or
null if
this callback does not provide a user session ID for the agent. |
void |
setUserSessionID(QualifiedAgent agent,
java.lang.String userSessionID)
Sets the designated user session ID for the designated agent.
|
protected final java.util.List<QualifiedAgent> agents
protected final java.util.HashMap<QualifiedAgent,java.lang.String> sessionIDs
public UserSessionIDCallback(java.util.List<QualifiedAgent> agents)
agents - The agents for which to retrieve user session IDs.public java.util.List<QualifiedAgent> getAgents()
QualifiedAgents for which to retrieve user session
IDs. There need not be a user session ID for all of these agents,
especially since this list does not reflect a previous selection of the
organisational position(s).public void setUserSessionID(QualifiedAgent agent, java.lang.String userSessionID)
agent - The agent for which to set a user session ID.userSessionID - The user session ID for session tokens for the
designated agent.java.lang.IllegalArgumentException - If the designated agent is not one for
which this callback tries to retrieve user session IDs, an
IllegalArgumentException will be thrown.public java.lang.String getUserSessionID(QualifiedAgent agent)
null if
this callback does not provide a user session ID for the agent.agent - The agent for which to retrieve a user session ID.null
if this callback does not provide a user session ID for the agent.