Session.Definition, Session.MemoryStore, Session.Store
Constructor and Description |
---|
SessionImpl(boolean isNew,
String sessionId,
long timeout) |
Modifier and Type | Method and Description |
---|---|
long |
accessedAt()
The last time the client sent a request associated with this session, as the number of
milliseconds since midnight January 1, 1970 GMT, and marked by the time the container
received the request.
|
Map<String,Object> |
attributes() |
long |
createdAt() |
void |
destroy()
Invalidates this session then unset any objects bound to it.
|
long |
expiryAt() |
<T> Optional<T> |
get(String name)
Get a object from this session.
|
String |
id() |
boolean |
isDirty() |
boolean |
isNew() |
long |
savedAt() |
Session |
set(String name,
Object value)
Set a session local using a the given name.
|
String |
toString() |
void |
touch() |
Session |
unset()
Unset/remove all the session data.
|
<T> Optional<T> |
unset(String name)
Remove a local value (if any) from session locals.
|
boolean |
validate() |
public SessionImpl(boolean isNew, String sessionId, long timeout)
public long createdAt()
public long accessedAt()
Session
Actions that your application takes, such as getting or setting a value associated with the session, do not affect the access time.
accessedAt
in interface Session
public long expiryAt()
public <T> Optional<T> get(String name)
Session
public Map<String,Object> attributes()
attributes
in interface Locals
attributes
in interface Session
public Session set(String name, Object value)
Session
public <T> Optional<T> unset(String name)
Session
public Session unset()
Session
public void destroy()
Session
public boolean isNew()
public boolean isDirty()
public long savedAt()
public void touch()
public boolean validate()
Copyright © 2015. All rights reserved.