public interface RequestWithSession
Its methods allow retrieval/creation of session and getting and setting of attributes associated to request.
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String key)
Returns value of the attribute.
|
RepositoryBackedSession |
getRepositoryBackedSession(boolean create)
Returns the
RepositoryBackedSession associated with this request. |
String |
getRequestedSessionId()
Id that has been retrieved from request.
|
boolean |
isIdRetrieved()
Returns true if id has been retrieved
|
boolean |
isRepositoryChecked()
Returns
true if repository was checked to see if it contains
the session corresponding to request. |
void |
repositoryChecked()
Marks that repository was checked to see if it contains the session
corresponding to request.
|
void |
setAttribute(String key,
Object value)
Sets the value of attribute
|
void |
setRequestedSessionId(String id)
Sets id that has been retrieved from request.
|
RepositoryBackedSession getRepositoryBackedSession(boolean create)
RepositoryBackedSession associated with this request.
If there is no associated session and create is
true, returns a new session.
If create is false and the request has no valid
RepositoryBackedSession, this method returns null.
As with HttpSession from servlet specification, to make sure the session is properly maintained, you must call this method before the response is committed. Depending on implementation, if caller asked to create a new session when the response is committed, an IllegalStateException can be thrown.
create - true to create a new session for this request if
necessary; false to return null if
there's no current sessionRepositoryBackedSession associated with this request or
null if create is false and
the request has no valid sessionObject getAttribute(String key)
key - attribute keyvoid setAttribute(String key, Object value)
key - attribute keyvalue - new value for the attributeboolean isIdRetrieved()
String getRequestedSessionId()
void setRequestedSessionId(String id)
id - the id that has been retrieved from request.boolean isRepositoryChecked()
true if repository was checked to see if it contains
the session corresponding to request.true if repository was checked to see if it contains
the session corresponding to request.void repositoryChecked()
Copyright © 2018 Amadeus s.a.s.. All rights reserved.