public class J2ESessionStore extends Object implements SessionStore<J2EContext>
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
J2ESessionStore() |
Modifier and Type | Method and Description |
---|---|
SessionStore<J2EContext> |
buildFromTrackableSession(J2EContext context,
Object trackableSession)
Build a new session store from a trackable session.
|
boolean |
destroySession(J2EContext context)
Destroy the web session.
|
Object |
get(J2EContext context,
String key)
Get the object from its key in store.
|
protected javax.servlet.http.HttpSession |
getHttpSession(J2EContext context) |
String |
getOrCreateSessionId(J2EContext context)
Get or create the session identifier and initialize the session with it if necessary.
|
Object |
getTrackableSession(J2EContext context)
Get the native session as a trackable object.
|
boolean |
renewSession(J2EContext context)
Renew the native session by copying all data to a new one.
|
void |
set(J2EContext context,
String key,
Object value)
Save an object in the store by its key.
|
protected javax.servlet.http.HttpSession getHttpSession(J2EContext context)
public String getOrCreateSessionId(J2EContext context)
SessionStore
getOrCreateSessionId
in interface SessionStore<J2EContext>
context
- the web contextpublic Object get(J2EContext context, String key)
SessionStore
get
in interface SessionStore<J2EContext>
context
- the web contextkey
- the key of the objectpublic void set(J2EContext context, String key, Object value)
SessionStore
set
in interface SessionStore<J2EContext>
context
- the web contextkey
- the key of the objectvalue
- the value to save in storepublic boolean destroySession(J2EContext context)
SessionStore
destroySession
in interface SessionStore<J2EContext>
context
- the web contextpublic Object getTrackableSession(J2EContext context)
SessionStore
getTrackableSession
in interface SessionStore<J2EContext>
context
- the web contextnull
if this is not supportedpublic SessionStore<J2EContext> buildFromTrackableSession(J2EContext context, Object trackableSession)
SessionStore
buildFromTrackableSession
in interface SessionStore<J2EContext>
context
- the web contexttrackableSession
- the trackable sessionnull
if this is not supportedpublic boolean renewSession(J2EContext context)
SessionStore
renewSession
in interface SessionStore<J2EContext>
context
- the web contextCopyright © 2018. All rights reserved.