public abstract static class SessionStore.InMemory extends Object implements SessionStore
SessionStore.InMemory
DEFAULT_TIMEOUT
Modifier and Type | Method and Description |
---|---|
void |
deleteSession(Context ctx,
Session session)
Delete a session from store.
|
Session |
findSession(Context ctx)
Find an existing session by ID.
|
SessionToken |
getToken()
Session token.
|
Session |
newSession(Context ctx)
Creates a new session.
|
void |
renewSessionId(Context ctx,
Session session)
Renew Session ID.
|
void |
saveSession(Context ctx,
Session session)
Save a session.
|
SessionStore |
setToken(SessionToken token)
Set custom session token.
|
void |
touchSession(Context ctx,
Session session)
Session attributes/state has changed.
|
@Nonnull public Session newSession(@Nonnull Context ctx)
SessionStore
Session.setNew(boolean)
- Optionally, set session creation time Session.setCreationTime(Instant)
- Optionally, set session last accessed time Session.setLastAccessedTime(Instant)
newSession
in interface SessionStore
ctx
- Web context.@Nonnull public SessionToken getToken()
SessionToken.SID
.@Nonnull public SessionStore setToken(@Nonnull SessionToken token)
token
- Session token.public Session findSession(Context ctx)
SessionStore
Session.setLastAccessedTime(Instant)
findSession
in interface SessionStore
ctx
- Web context.null
.public void deleteSession(@Nonnull Context ctx, @Nonnull Session session)
SessionStore
Session.destroy()
.deleteSession
in interface SessionStore
ctx
- Web context.session
- Current session.public void touchSession(@Nonnull Context ctx, @Nonnull Session session)
SessionStore
touchSession
in interface SessionStore
ctx
- Web context.session
- Current session.public void saveSession(Context ctx, @Nonnull Session session)
SessionStore
saveSession
in interface SessionStore
ctx
- Web context.session
- Current session.public void renewSessionId(@Nonnull Context ctx, @Nonnull Session session)
SessionStore
renewSessionId
in interface SessionStore
ctx
- Web Context.session
- Session.Copyright © 2023. All rights reserved.