Package de.esoco.data
Schnittstelle SessionManager
public interface SessionManager
Interface for objects that manage sessions and provide informations about
them.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetAbsoluteFileName
(String fileName) Returns the absolute path name for a relative path.Returns an object containing information about the context of the managed sessions if available.Returns the data for the current session.Returns a unique ID string that identifies the current session.Returns a collection with all active sessions if available.loginUser
(StringDataElement loginData, String clientInfo) Performs the login of a certain user.void
Terminates the current session to logout the associated user.prepareDownload
(DownloadData data) Prepares the download of a certain data object.prepareUpload
(UploadHandler uploadHandler) Prepares the upload of data from the client.void
removeDownload
(String url) Removes the download data that has previously been registered by a call toprepareDownload(DownloadData)
.void
removeUpload
(String url) Removes an upload handler that has previously been registered by a call toprepareUpload(UploadHandler)
.
-
Methodendetails
-
getAbsoluteFileName
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
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
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
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
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 credentialsclientInfo
- 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
Prepares the download of a certain data object. Each prepared download must be removed if it is no longer needed by invoking the methodremoveDownload(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
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 toremoveUpload(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
Removes the download data that has previously been registered by a call toprepareDownload(DownloadData)
.- Parameter:
url
- The URL the download data had been registered for
-
removeUpload
Removes an upload handler that has previously been registered by a call toprepareUpload(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
-