Class Session

java.lang.Object
org.identityconnectors.common.Session

public class Session extends 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 Details

    • generate

      public static Session generate(PublicKey publicKey)
      Generate a new Session using the provided PublicKey.
      Parameters:
      publicKey - the PublicKey
      Returns:
      the generated Session
    • qualify

      public Session qualify(String qualifier) throws IllegalStateException
      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

      public Session qualify(Session session) throws 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:
      IllegalStateException - if the Session has already been qualified
    • parse

      public static Session parse(String sessionId)
      Parse the provided Session identifier String and construct a new Session.
      Parameters:
      sessionId - the Session identifier String
      Returns:
      the Session
    • getId

      public String getId()
      Retrieve the Session identifier for this Session.
      Returns:
      the Session identifier
    • getQualifier

      public String getQualifier()
      Retrieve the Session qualifier for this Session.
      Returns:
      the Session qualifier
    • getPublicKey

      public PublicKey getPublicKey()
      Retrieve the PublicKey for this Session.
      Returns:
      the PublicKey
    • toString

      public String toString()
      Retrieve the String representation of this Session.
      Overrides:
      toString in class Object
      Returns:
      the qualified Session identifier
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object