public class AutoTimeoutSessionManagerImpl extends Object implements AutoTimeoutSessionManager, FdkSessionListener
AutoTimeoutSessionManager
interface.
See the documentation for the interface.Constructor and Description |
---|
AutoTimeoutSessionManagerImpl(Server server,
long timeout,
Map options)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
disconnectCallback(FdkSession session)
Called right before a session is about to be disconnected.
|
FdkSession |
getSession(String username)
Retrieves a session for the specified user.
|
void |
returnSession(FdkSession session)
Returns a session back to the manager.
|
String |
toString()
String representation.
|
public AutoTimeoutSessionManagerImpl(Server server, long timeout, Map options) throws FdkException
server
- Server to use for authentication.timeout
- The timeout for the sessions in seconds
A value less or equal than zero will set a default
timeout of 1800 seconds.options
- Options used when creating new sessions.FdkException
public FdkSession getSession(String username) throws FdkException
AutoTimeoutSessionManager
NOTE: No authentication for the user is performed, the caller needs to make sure the user is authenticated via other means BEFORE calling this method.
getSession
in interface AutoTimeoutSessionManager
username
- The username for which to get a session.FdkException
public void returnSession(FdkSession session) throws FdkException
AutoTimeoutSessionManager
returnSession
in interface AutoTimeoutSessionManager
session
- The session to return back.FdkException
public void disconnectCallback(FdkSession session)
FdkSessionListener
disconnectCallback
in interface FdkSessionListener
session
- The session being disconnected.Copyright © 2023. All rights reserved.