Class SessionCatalog.SessionContext

  • Enclosing interface:
    SessionCatalog

    public static final class SessionCatalog.SessionContext
    extends java.lang.Object
    Context for a session.
    • Constructor Summary

      Constructors 
      Constructor Description
      SessionContext​(java.lang.String sessionId, java.lang.String identity, java.util.Map<java.lang.String,​java.lang.String> credentials, java.util.Map<java.lang.String,​java.lang.String> properties)  
      SessionContext​(java.lang.String sessionId, java.lang.String identity, java.util.Map<java.lang.String,​java.lang.String> credentials, java.util.Map<java.lang.String,​java.lang.String> properties, java.lang.Object wrappedIdentity)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static SessionCatalog.SessionContext createEmpty()  
      java.util.Map<java.lang.String,​java.lang.String> credentials()
      Returns the session's credential map.
      java.lang.String identity()
      Returns a string that identifies the current user or principal.
      java.util.Map<java.lang.String,​java.lang.String> properties()
      Returns a map of properties currently set for the session.
      java.lang.String sessionId()
      Returns a string that identifies this session.
      java.lang.Object wrappedIdentity()
      Returns the opaque wrapped identity object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SessionContext

        public SessionContext​(java.lang.String sessionId,
                              java.lang.String identity,
                              java.util.Map<java.lang.String,​java.lang.String> credentials,
                              java.util.Map<java.lang.String,​java.lang.String> properties)
      • SessionContext

        public SessionContext​(java.lang.String sessionId,
                              java.lang.String identity,
                              java.util.Map<java.lang.String,​java.lang.String> credentials,
                              java.util.Map<java.lang.String,​java.lang.String> properties,
                              java.lang.Object wrappedIdentity)
    • Method Detail

      • sessionId

        public java.lang.String sessionId()
        Returns a string that identifies this session.

        This can be used for caching state within a session.

        Returns:
        a string that identifies this session
      • identity

        public java.lang.String identity()
        Returns a string that identifies the current user or principal.

        This identity cannot change for a given session ID.

        Returns:
        a user or principal identity string
      • credentials

        public java.util.Map<java.lang.String,​java.lang.String> credentials()
        Returns the session's credential map.

        This cannot change for a given session ID.

        Returns:
        a credential string
      • properties

        public java.util.Map<java.lang.String,​java.lang.String> properties()
        Returns a map of properties currently set for the session.
        Returns:
        a map of properties
      • wrappedIdentity

        public java.lang.Object wrappedIdentity()
        Returns the opaque wrapped identity object.
        Returns:
        the wrapped identity