Package org.identityconnectors.common
Class Session
java.lang.Object
org.identityconnectors.common.Session
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
Modifier and TypeMethodDescriptionboolean
static Session
Generate a new Session using the provided PublicKey.getId()
Retrieve the Session identifier for this Session.Retrieve the PublicKey for this Session.Retrieve the Session qualifier for this Session.int
hashCode()
static Session
Parse the provided Session identifier String and construct a new Session.Qualify a previously unqualified Session with the specified qualifier.Qualify a previously unqualified Session using the provided qualified Session as qualifier.toString()
Retrieve the String representation of this Session.
-
Method Details
-
generate
Generate a new Session using the provided PublicKey.- Parameters:
publicKey
- the PublicKey- Returns:
- the generated Session
-
qualify
Qualify a previously unqualified Session with the specified qualifier.- Parameters:
qualifier
- the session Id qualifier- Returns:
- a qualified copy of the Session
- Throws:
IllegalStateException
- if the Session has already been qualified
-
qualify
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:
IllegalStateException
- if the Session has already been qualified
-
parse
Parse the provided Session identifier String and construct a new Session.- Parameters:
sessionId
- the Session identifier String- Returns:
- the Session
-
getId
Retrieve the Session identifier for this Session.- Returns:
- the Session identifier
-
getQualifier
Retrieve the Session qualifier for this Session.- Returns:
- the Session qualifier
-
getPublicKey
Retrieve the PublicKey for this Session.- Returns:
- the PublicKey
-
toString
Retrieve the String representation of this Session. -
equals
-
hashCode
public int hashCode()
-