public class MemorySessionStore extends Object implements SessionStore
Constructor and Description |
---|
MemorySessionStore(SessionToken token) |
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.
|
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.
|
void |
touchSession(Context ctx,
Session session)
Session attributes/state has changed.
|
public MemorySessionStore(SessionToken token)
public Session newSession(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.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 © 2019. All rights reserved.