The interface to a generic session associated with a request.
This interface may be used directly, or it may be wrapped by an API specific
representation of a session. Such wrappers must implement the API
sub interface.
Depending on the implementation the attribute values may be stored locally in memory or in a remote
database. The instances of the attribute values may be different to those passed to setAttribute(String, Object)
or to those returned in previous getAttribute(String) calls.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | Session.
An API wrapper of the core session. |
| public static interface | Session.
Listener interface that if implemented by a value of an attribute of an enclosing |
| public static interface | Session.
Listener interface that if implemented by a session attribute value, will be notified of session value events. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public < The type of the API wrapper. T extends Session. | |
| public String | getExtendedId()
Returns: The session identifier as returned by |
| public String | |
| public long | getLastAccessedTime()
Returns: the time, as represented by |
| public int | getMaxInactiveInterval()
Returns: The period in secs in which the session will remain valid (unless explicitly invalidated) when not accessed by any requests. |
| public static Session | Returns: The associated Session.The API wrapper of the session session)Get the session associated with an API session wrapper. |
| public void | invalidate()
Invalidate this session in the current context and all sessions of the same identity with associated contexts. |
| public boolean | |
| public boolean | |
| public void | |
| public void | setMaxInactiveInterval(int
The period in secs in which the session will remain valid (unless explicitly invalidated)
when not accessed by any requests. secs)
|
| encodeURI | back to summary |
|---|---|
| public String encodeURI(Request request, String uri, boolean cookiesInUse) | |
| getApi | back to summary |
|---|---|
public <T extends Session.
| |
| getExtendedId | back to summary |
|---|---|
| public String getExtendedId() | |
| getId | back to summary |
|---|---|
public String getId()
| |
| getLastAccessedTime | back to summary |
|---|---|
public long getLastAccessedTime()
| |
| getMaxInactiveInterval | back to summary |
|---|---|
public int getMaxInactiveInterval()
| |
| getSession | back to summary |
|---|---|
| public static Session getSession(Object session) Get the session associated with an API session wrapper. | |
| invalidate | back to summary |
|---|---|
| public void invalidate() Invalidate this session in the current context and all sessions of the same identity with associated contexts. | |
| isNew | back to summary |
|---|---|
public boolean isNew() throws IllegalStateException
| |
| isValid | back to summary |
|---|---|
public boolean isValid()
| |
| renewId | back to summary |
|---|---|
| public void renewId(Request request, Response response) Renew the identity of the session. Typically, this is done after a change of authentication or confidentiality. | |
| setMaxInactiveInterval | back to summary |
|---|---|
public void setMaxInactiveInterval(int secs)
| |
An API wrapper of the core session.
API wrappers of the Session must implement this interface and return
the Session that they wrap.
| Modifier and Type | Method and Description |
|---|---|
| public Session |
| getSession | back to summary |
|---|---|
| public Session getSession() | |
Context at start, will be
notified of session lifecycle events.
| Modifier and Type | Method and Description |
|---|---|
| public default void | |
| public default void | |
| public default void |
| onSessionCreated | back to summary |
|---|---|
| public default void onSessionCreated(Session session) | |
| onSessionDestroyed | back to summary |
|---|---|
| public default void onSessionDestroyed(Session session) | |
| onSessionIdChanged | back to summary |
|---|---|
| public default void onSessionIdChanged(Session session, String oldId) | |
| Modifier and Type | Method and Description |
|---|---|
| public default void | |
| public default void | |
| public default void |
| onSessionActivation | back to summary |
|---|---|
| public default void onSessionActivation(Session session) | |
| onSessionAttributeUpdate | back to summary |
|---|---|
| public default void onSessionAttributeUpdate(Session session, String name, Object oldValue, Object newValue) | |
| onSessionPassivation | back to summary |
|---|---|
| public default void onSessionPassivation(Session session) | |