be.ehealth.technicalconnector.session

## Interface SessionManager

- All Known Implementing Classes:
    SessionManagerImpl

      public interface SessionManager

  The Interface SessionManager.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `SessionItem` | `createFallbackSession(String hokPwd)` Creates a fallback session using a eHealth certificate stored on the computer.
    `SessionItem` | `createFallbackSession(String hokPwd, String encryptionPwd)` Creates a fallback session using a eHealth certificate stored on the computer.
    `SessionItem` | `createFallbackSession(String identPwd, String hokPwd, String encryptionPwd)` Creates a fallback session using a eHealth certificate stored on the computer.
    `SessionItem` | `createSession(String hokPwd)` Creates a session using the certificate on the eID of the user and an holder of key certificate stored on the computer.
    `SessionItem` | `createSession(String hokPwd, String encryptionPwd)` Creates a session using the certificate on the eID of the user and an holder of key certificate stored on the computer.
    `SessionItem` | `createSessionEidOnly()` Creates a session only based on eid card.
    `SessionItem` | `getSession()` Gets the current session.
    `boolean` | `hasValidSession()` Checks for valid session.
    `void` | `loadEncryptionKeys(String encryptionPwd)`
    `void` | `loadSession(SAMLToken token, String hokPwd)` Load a session using a previously stored SAML token.
    `void` | `loadSession(SAMLToken token, String hokPwd, String encryptionPwd)` Load a session using a previously stored SAML token with the associated eHealth Encryption Certificates, needed for sealing and unsealing messages.
    `void` | `registerSessionService(SessionServiceWithCache serviceWithCache)` This method will register all the session service with a cache.
    `void` | `setKeyStore(Map<String,KeyStore> keystores)` Method to set the keyStores that the sessionManagment should use.
    `void` | `unloadSession()` Unload the current session.

- - ### Method Detail

    - #### loadSession

          void loadSession(SAMLToken token,
                           String hokPwd)
                    throws TechnicalConnectorException

      Load a session using a previously stored SAML token.
      Parameters:
        `token` - the token to load
        `hokPwd` - the holder of key password
      Throws:
        `TechnicalConnectorException` - the technical connector exception

    - #### loadSession

          void loadSession(SAMLToken token,
                           String hokPwd,
                           String encryptionPwd)
                    throws TechnicalConnectorException

      Load a session using a previously stored SAML token with the associated eHealth Encryption Certificates, needed for sealing and unsealing messages.
      Parameters:
        `token` - the token to load
        `hokPwd` - the holder of key password
        `encryptionPwd` - the encryption of key password
      Throws:
        `TechnicalConnectorException`

    - #### createSessionEidOnly

          SessionItem createSessionEidOnly()
                                    throws TechnicalConnectorException

      Creates a session only based on eid card. The eID is used for identifcation, holder of key verification and sealing.
      Returns:
        `SessionItem` not usable for encryption
      Throws:
        `TechnicalConnectorException`

    - #### createSession

          SessionItem createSession(String hokPwd)
                             throws SessionManagementException,
                                    TechnicalConnectorException

      Creates a session using the certificate on the eID of the user and an holder of key certificate stored on the computer. If you want to create a new session, unload your previous session first via the unloadSession method.
      Parameters:
        `hokPwd` - the holder of key password
      Returns:
        the session item
      Throws:
        `TechnicalConnectorException` - the technical connector exception
        `SessionManagementException`

    - #### createSession

          SessionItem createSession(String hokPwd,
                                    String encryptionPwd)
                             throws SessionManagementException,
                                    TechnicalConnectorException

      Creates a session using the certificate on the eID of the user and an holder of key certificate stored on the computer. If you want to create a new session, unload your previous session first via the unloadSession method. The session also loads in your Encryption eHealth Certificates, needed for sealing and unsealing messages. *
      Parameters:
        `hokPwd` - the holder of key password
        `encryptionPwd` - the encryption of key password
      Returns:
        the session item
      Throws:
        `TechnicalConnectorException` - the technical connector exception
        `SessionManagementException`

    - #### createFallbackSession

          SessionItem createFallbackSession(String hokPwd)
                                     throws SessionManagementException,
                                            TechnicalConnectorException

      Creates a fallback session using a eHealth certificate stored on the computer. If you want to create a new session, unload your previous session first via the unloadSession method
      Parameters:
        `hokPwd` - the holder of key password
      Returns:
        the session item
      Throws:
        `TechnicalConnectorException` - the technical connector exception
        `SessionManagementException`

    - #### createFallbackSession

          SessionItem createFallbackSession(String hokPwd,
                                            String encryptionPwd)
                                     throws SessionManagementException,
                                            TechnicalConnectorException

      Creates a fallback session using a eHealth certificate stored on the computer. If you want to create a new session, unload your previous session first via the unloadSession method The session also loads in your Encryption eHealth Certificates, needed for sealing and unsealing messages. *
      Parameters:
        `hokPwd` - the holder of key password
        `encryptionPwd` - the encryption of key password
      Returns:
        the session item
      Throws:
        `TechnicalConnectorException` - the technical connector exception
        `SessionManagementException`

    - #### createFallbackSession

          SessionItem createFallbackSession(String identPwd,
                                            String hokPwd,
                                            String encryptionPwd)
                                     throws SessionManagementException,
                                            TechnicalConnectorException

      Creates a fallback session using a eHealth certificate stored on the computer. If you want to create a new session, unload your previous session first via the unloadSession method The session also loads in your Encryption eHealth Certificates, needed for sealing and unsealing messages. *
      Parameters:
        `identPwd` - the identification pwd
        `hokPwd` - the holder of key password
        `encryptionPwd` - the encryption of key password
      Returns:
        the session item
      Throws:
        `TechnicalConnectorException` - the technical connector exception
        `SessionManagementException`

    - #### getSession

          SessionItem getSession()

      Gets the current session.
      Returns:
        the session

    - #### unloadSession

          void unloadSession()

      Unload the current session.

    - #### hasValidSession

          boolean hasValidSession()
                           throws SessionManagementException

      Checks for valid session.
      Returns:
        true, if successful
      Throws:
        `SessionManagementException`

    - #### loadEncryptionKeys

          void loadEncryptionKeys(String encryptionPwd)
                           throws TechnicalConnectorException

      Parameters:
        `encryptionPwd` - the encryption of key password
      Throws:
        `TechnicalConnectorException`

    - #### registerSessionService

          void registerSessionService(SessionServiceWithCache serviceWithCache)

      This method will register all the session service with a cache. When the unload session is invoke all those services will be 'cl
      Parameters:
        `serviceWithCache` -
      See Also:
        `be.ehealth.technicalconnector.session.SessionManager#registreCacheCleaner(be.ehealth.businessconnector.CleanUpCache)`

    - #### setKeyStore

          void setKeyStore(Map<String,KeyStore> keystores)

      Method to set the keyStores that the sessionManagment should use.
      There are 3 supported store types:

    - identification
    - holderofkey
    - encryption

Connector Package PERSMIDWIFE 4.8.4 API
Copyright © {inceptionYear}-2025 eHealth. All Rights Reserved.