Package be.ehealth.technicalconnector.session

# Class Session

java.lang.Object
be.ehealth.technicalconnector.session.Session

public final class Session extends Object
Entry Point for access to the active Session and the Session Manager.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ENCRYPTION_KEYSTORE`
  Key that identifies the encryption keystore in the keystore map.
  `static final String`
  `HOLDEROFKEY_KEYSTORE`
  Key that identifies the holder of key keystore in the keystore map.
  `static final String`
  `IDENTIFICATION_KEYSTORE`
  Key that identifies the identification keystore in the keystore map.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static SessionManager`
  `getInstance()`
  Gets the single instance of SessionManager.
  `static SAMLToken`
  `getSAMLToken()`
  Convenience method to get the SAML token associated with the session.
  `static void`
  `setSessionManager(SessionManager sessionManager)`
  Sets the session manager.
  `static void`
  `validateSession()`
  Convenience method to validate session exists.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### IDENTIFICATION_KEYSTORE

    public static final String IDENTIFICATION_KEYSTORE
    Key that identifies the identification keystore in the keystore map.
    See Also:
      - Constant Field Values

  - ### HOLDEROFKEY_KEYSTORE

    public static final String HOLDEROFKEY_KEYSTORE
    Key that identifies the holder of key keystore in the keystore map.
    See Also:
      - Constant Field Values

  - ### ENCRYPTION_KEYSTORE

    public static final String ENCRYPTION_KEYSTORE
    Key that identifies the encryption keystore in the keystore map.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getInstance

    public static SessionManager getInstance()
    Gets the single instance of SessionManager.
    Returns:
      single instance of SessionManager

  - ### setSessionManager

    public static void setSessionManager(SessionManager sessionManager)
    Sets the session manager.
    Parameters:
      `sessionManager` - the new session manager

  - ### getSAMLToken

    public static SAMLToken getSAMLToken()
    Convenience method to get the SAML token associated with the session.
    Returns:
      the SAML token

  - ### validateSession

    public static void validateSession() throws TechnicalConnectorException
    Convenience method to validate session exists.
    Throws:
      `TechnicalConnectorException`