Package org.identityconnectors.common
Class Session
- java.lang.Object
-
- org.identityconnectors.common.Session
-
public class Session extends java.lang.Object
Encapsulates a Session identifier. A Session Id is composed of a qualifier and unique identifier which are separated by a colon.A Session is associated with one or more WebSockets within a WebSocketConnectionGroup and is set by the client when initiating the ICF Handshake between the client and server.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
static Session
generate(java.security.PublicKey publicKey)
Generate a new Session using the provided PublicKey.java.lang.String
getId()
Retrieve the Session identifier for this Session.java.security.PublicKey
getPublicKey()
Retrieve the PublicKey for this Session.java.lang.String
getQualifier()
Retrieve the Session qualifier for this Session.int
hashCode()
static Session
parse(java.lang.String sessionId)
Parse the provided Session identifier String and construct a new Session.Session
qualify(java.lang.String qualifier)
Qualify a previously unqualified Session with the specified qualifier.Session
qualify(Session session)
Qualify a previously unqualified Session using the provided qualified Session as qualifier.java.lang.String
toString()
Retrieve the String representation of this Session.
-
-
-
Method Detail
-
generate
public static Session generate(java.security.PublicKey publicKey)
Generate a new Session using the provided PublicKey.- Parameters:
publicKey
- the PublicKey- Returns:
- the generated Session
-
qualify
public Session qualify(java.lang.String qualifier) throws java.lang.IllegalStateException
Qualify a previously unqualified Session with the specified qualifier.- Parameters:
qualifier
- the session Id qualifier- Returns:
- a qualified copy of the Session
- Throws:
java.lang.IllegalStateException
- if the Session has already been qualified
-
qualify
public Session qualify(Session session) throws java.lang.IllegalStateException
Qualify a previously unqualified Session using the provided qualified Session as qualifier.- Parameters:
session
- the session whose qualifier should be used to qualify this Session- Returns:
- a qualified copy of the Session
- Throws:
java.lang.IllegalStateException
- if the Session has already been qualified
-
parse
public static Session parse(java.lang.String sessionId)
Parse the provided Session identifier String and construct a new Session.- Parameters:
sessionId
- the Session identifier String- Returns:
- the Session
-
getId
public java.lang.String getId()
Retrieve the Session identifier for this Session.- Returns:
- the Session identifier
-
getQualifier
public java.lang.String getQualifier()
Retrieve the Session qualifier for this Session.- Returns:
- the Session qualifier
-
getPublicKey
public java.security.PublicKey getPublicKey()
Retrieve the PublicKey for this Session.- Returns:
- the PublicKey
-
toString
public java.lang.String toString()
Retrieve the String representation of this Session.- Overrides:
toString
in classjava.lang.Object
- Returns:
- the qualified Session identifier
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-