public class OOBSession<L,B extends Batch> extends Object implements Session<L>, SessionMetaData, SessionAttributes
| Constructor and Description |
|---|
OOBSession(SessionManager<L,B> manager,
String id,
L localContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Indicates that the application thread is finished with this session.
|
Object |
getAttribute(String name)
Retrieves the value of the specified attribute.
|
Set<String> |
getAttributeNames()
Returns the names of the attributes of this session.
|
SessionAttributes |
getAttributes()
Returns this session's attributes.
|
Instant |
getCreationTime()
Returns the time this session was created.
|
String |
getId()
Specifies this session's unique identifier.
|
Instant |
getLastAccessEndTime()
Returns the end time of the last request to access this session.
|
Instant |
getLastAccessStartTime()
Returns the start time of the last request to access this session.
|
L |
getLocalContext()
Returns the local context of this session.
|
Duration |
getMaxInactiveInterval()
Returns the time interval since
SessionExpirationMetaData.getLastAccessEndTime() after which this session will expire. |
SessionMetaData |
getMetaData()
Returns this session's meta data.
|
void |
invalidate()
Invalidates this session.
|
boolean |
isExpired()
Indicates whether or not this session was previously idle for longer than the maximum inactive interval.
|
boolean |
isNew()
Indicates whether or not this session was created by the current thread.
|
boolean |
isValid()
Indicates whether or not this session is valid.
|
Object |
removeAttribute(String name)
Removes the specified attribute.
|
Object |
setAttribute(String name,
Object value)
Sets the specified attribute to the specified value.
|
void |
setLastAccess(Instant startTime,
Instant endTime)
Sets the time this session was last accessed.
|
void |
setMaxInactiveInterval(Duration duration)
Set the time interval as a duration, after which this session will expire.
|
public OOBSession(SessionManager<L,B> manager, String id, L localContext)
public String getId()
ImmutableSessiongetId in interface ImmutableSessionpublic boolean isValid()
ImmutableSessionisValid in interface ImmutableSessionpublic SessionMetaData getMetaData()
SessiongetMetaData in interface ImmutableSessiongetMetaData in interface Session<L>public void invalidate()
Sessioninvalidate in interface Session<L>public SessionAttributes getAttributes()
SessiongetAttributes in interface ImmutableSessiongetAttributes in interface Session<L>public L getLocalContext()
SessiongetLocalContext in interface Session<L>public void close()
Sessionclose in interface AutoCloseableclose in interface Session<L>public boolean isNew()
ImmutableSessionMetaDataisNew in interface ImmutableSessionMetaDatapublic boolean isExpired()
SessionExpirationMetaDataisExpired in interface SessionExpirationMetaDatapublic Instant getCreationTime()
ImmutableSessionMetaDatagetCreationTime in interface ImmutableSessionMetaDatapublic Instant getLastAccessStartTime()
ImmutableSessionMetaDatagetLastAccessStartTime in interface ImmutableSessionMetaDatapublic Instant getLastAccessEndTime()
SessionExpirationMetaDatagetLastAccessEndTime in interface SessionExpirationMetaDatapublic Duration getMaxInactiveInterval()
SessionExpirationMetaDataSessionExpirationMetaData.getLastAccessEndTime() after which this session will expire.getMaxInactiveInterval in interface SessionExpirationMetaDatapublic void setLastAccess(Instant startTime, Instant endTime)
SessionMetaDatasetLastAccess in interface SessionMetaDatapublic void setMaxInactiveInterval(Duration duration)
SessionMetaDatasetMaxInactiveInterval in interface SessionMetaDataduration - a time durationpublic Set<String> getAttributeNames()
ImmutableSessionAttributesgetAttributeNames in interface ImmutableSessionAttributespublic Object getAttribute(String name)
ImmutableSessionAttributesgetAttribute in interface ImmutableSessionAttributesname - a unique attribute namepublic Object removeAttribute(String name)
SessionAttributesremoveAttribute in interface SessionAttributesname - a unique attribute namepublic Object setAttribute(String name, Object value)
SessionAttributessetAttribute in interface SessionAttributesname - a unique attribute namevalue - the attribute valueCopyright © 2021 JBoss by Red Hat. All rights reserved.