Package org.identityconnectors.common
Class Session
- java.lang.Object
-
- org.identityconnectors.common.Session
-
public class Session extends java.lang.ObjectEncapsulates 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 booleanequals(java.lang.Object o)static Sessiongenerate(java.security.PublicKey publicKey)Generate a new Session using the provided PublicKey.java.lang.StringgetId()Retrieve the Session identifier for this Session.java.security.PublicKeygetPublicKey()Retrieve the PublicKey for this Session.java.lang.StringgetQualifier()Retrieve the Session qualifier for this Session.inthashCode()static Sessionparse(java.lang.String sessionId)Parse the provided Session identifier String and construct a new Session.Sessionqualify(java.lang.String qualifier)Qualify a previously unqualified Session with the specified qualifier.Sessionqualify(Session session)Qualify a previously unqualified Session using the provided qualified Session as qualifier.java.lang.StringtoString()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:
toStringin classjava.lang.Object- Returns:
- the qualified Session identifier
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-