Package de.esoco.data

Schnittstelle SessionManager


public interface SessionManager
Interface for objects that manage sessions and provide informations about them.
  • Methodendetails

    • getAbsoluteFileName

      String getAbsoluteFileName(String fileName)
      Returns the absolute path name for a relative path.
      Parameter:
      fileName - The relative file name
      Gibt zurück:
      The absolute file name for the given path
    • getSessionContext

      SessionContext getSessionContext() throws Exception
      Returns an object containing information about the context of the managed sessions if available.
      Gibt zurück:
      The session context (NULL if not available)
      Löst aus:
      Exception - If the session context cannot be accessed
    • getSessionData

      SessionData getSessionData() throws Exception
      Returns the data for the current session. How exactly that will be determined depends on the implementation.
      Gibt zurück:
      The session data for the current session
      Löst aus:
      Exception - If the session data cannot be accessed
    • getSessionId

      String getSessionId()
      Returns a unique ID string that identifies the current session.
      Gibt zurück:
      The session ID
    • getSessions

      Collection<SessionData> getSessions() throws Exception
      Returns a collection with all active sessions if available.
      Gibt zurück:
      The active sessions or NULL if not available
      Löst aus:
      Exception - If the session data cannot be accessed
    • loginUser

      DataElementList loginUser(StringDataElement loginData, String clientInfo) throws Exception
      Performs the login of a certain user. The data element parameter must contain the login name as it's name and the password as it's value. It may also carry application-specific properties that are needed by the respective implementation.
      Parameter:
      loginData - A data element containing the login credentials
      clientInfo - Information about the connecting client
      Gibt zurück:
      A data element list containing the user data if the authentication was successful
      Löst aus:
      Exception - May throw any kind of exception if the authentication fails
    • logoutCurrentUser

      void logoutCurrentUser()
      Terminates the current session to logout the associated user.
    • prepareDownload

      String prepareDownload(DownloadData data) throws Exception
      Prepares the download of a certain data object. Each prepared download must be removed if it is no longer needed by invoking the method removeDownload(String) with the URL returned by this method.
      Parameter:
      data - The download data object
      Gibt zurück:
      The download URL
      Löst aus:
      Exception - If the download cannot be prepared
    • prepareUpload

      String prepareUpload(UploadHandler uploadHandler) throws Exception
      Prepares the upload of data from the client. The returned value is an application-relative URL that must be used by the client as the upload target and to remove the upload when it is no longer needed with a call to removeUpload(String).
      Parameter:
      uploadHandler - The handler to process the uploaded data
      Gibt zurück:
      An application-relative upload URL
      Löst aus:
      Exception - If the preparation fails
    • removeDownload

      void removeDownload(String url)
      Removes the download data that has previously been registered by a call to prepareDownload(DownloadData).
      Parameter:
      url - The URL the download data had been registered for
    • removeUpload

      void removeUpload(String url)
      Removes an upload handler that has previously been registered by a call to prepareUpload(UploadHandler). It is recommended that implementations handle failures in the removal process without throwing an exception.
      Parameter:
      url - The URL the upload handler had been registered with