Interface PlatformSessionService

All Known Implementing Classes:
PlatformSessionServiceImpl

public interface PlatformSessionService
Author:
Elias Ricken de Medeiros, Matthieu Chaffotte
  • Method Details

    • createSession

      SPlatformSession createSession(String username) throws SSessionException
      Create a new session for the given user;
      Parameters:
      username - user name
      Returns:
      a new session
      Throws:
      SSessionException - if some error arrives while creating the session
      Since:
      6.0
    • deleteSession

      void deleteSession(long sessionId) throws SSessionNotFoundException
      Delete a session having the given id
      Parameters:
      sessionId - the session's id
      Throws:
      SSessionNotFoundException - if no session exists for the given id
      Since:
      6.0
    • isValid

      boolean isValid(long sessionId) throws SSessionNotFoundException
      Verify if a session is valid
      Parameters:
      sessionId - the session's id
      Returns:
      true if the session is valid, false otherwise
      Throws:
      SSessionNotFoundException
      Since:
      6.0
    • getSession

      SPlatformSession getSession(long sessionId) throws SSessionNotFoundException
      Retrieve a session by its id
      Parameters:
      sessionId - the session's id
      Returns:
      the session associated to the given id
      Throws:
      SSessionNotFoundException - if no session exists for the given id
      Since:
      6.0
    • setSessionDuration

      void setSessionDuration(long duration)
      Define how long new created sessions will be valid. This does not affect already created session
      Parameters:
      duration - session's duration
      Since:
      6.0
    • getDefaultSessionDuration

      long getDefaultSessionDuration()
      Retrieve the default sessions's duration
      Returns:
      the default sessions's duration
      Since:
      6.0
    • getSessionsDuration

      long getSessionsDuration()
      Retrieve the duration of new created sessions. If no duration was specified, the default duration will be used
      Returns:
      the duration of new created sessions
      Since:
      6.0
    • renewSession

      void renewSession(long sessionId) throws SSessionException
      Update the expiration and the last update dates of the session.
      Parameters:
      sessionId - the session's id
      Throws:
      SSessionException
      Since:
      6.0