The session manager is responsible for maintaining session state.
As part of session creation the session manager MUST attempt to retrieve the SessionCookieConfig from
the HttpServerExchange and use it to set the session cookie. The frees up the session manager from
needing to know details of the cookie configuration. When invalidating a session the session manager MUST
also use this to clear the session cookie.
| Modifier and Type | Field and Description |
|---|---|
| public static final AttachmentKey |
| Modifier and Type | Method and Description |
|---|---|
| public Session | Returns: The created sessionCreates a new session. |
| public Set | getActiveSessions()
Returns the identifiers of those sessions that are active on this node, excluding passivated sessions |
| public Set | |
| public String | |
| public Session | Returns: An IoFuture that can be used to retrieve the session, or an IoFuture that will return null if not found
|
| public Session | Returns: The session, or null if it does not existThe session ID sessionId)Retrieves a session with the given session id |
| public SessionManagerStatistics | getStatistics()
Returns the statistics for this session manager, or null, if statistics are not supported. |
| public Set | getTransientSessions()
Returns the identifiers of those sessions that would be lost upon shutdown of this node |
| public void | registerSessionListener(final SessionListener
The listener listener)Registers a session listener for the session manager |
| public void | removeSessionListener(final SessionListener
the listener listener)Removes a session listener from the session manager |
| public void | |
| public void | |
| public void |
| ATTACHMENT_KEY | back to summary |
|---|---|
| public static final AttachmentKey<SessionManager> ATTACHMENT_KEY | |
| createSession | back to summary |
|---|---|
| public Session createSession(final HttpServerExchange serverExchange, final SessionConfig sessionCookieConfig) Creates a new session. Any
This method *MUST* call
This requirement exists to allow forwards across servlet contexts to work correctly.
The session manager is responsible for making sure that a newly created session is accessible to later calls to
| |
| getActiveSessions | back to summary |
|---|---|
| public Set Returns the identifiers of those sessions that are active on this node, excluding passivated sessions | |
| getAllSessions | back to summary |
|---|---|
| public Set Returns the identifiers of all sessions, including both active and passive | |
| getDeploymentName | back to summary |
|---|---|
| public String getDeploymentName() Uniquely identifies this session manager
| |
| getSession | back to summary |
|---|---|
public Session getSession(final HttpServerExchange serverExchange, final SessionConfig sessionCookieConfig)
| |
| getSession | back to summary |
|---|---|
| public Session getSession(final String sessionId) Retrieves a session with the given session id | |
| getStatistics | back to summary |
|---|---|
| public SessionManagerStatistics getStatistics() Returns the statistics for this session manager, or null, if statistics are not supported. | |
| getTransientSessions | back to summary |
|---|---|
| public Set Returns the identifiers of those sessions that would be lost upon shutdown of this node | |
| registerSessionListener | back to summary |
|---|---|
| public void registerSessionListener(final SessionListener listener) Registers a session listener for the session manager
| |
| removeSessionListener | back to summary |
|---|---|
| public void removeSessionListener(final SessionListener listener) Removes a session listener from the session manager
| |
| setDefaultSessionTimeout | back to summary |
|---|---|
| public void setDefaultSessionTimeout(final int timeout) Sets the default session timeout
| |
| start | back to summary |
|---|---|
| public void start() Starts the session manager | |
| stop | back to summary |
|---|---|
| public void stop() stops the session manager | |