-
- All Implemented Interfaces:
public interface SessionPort
-
-
Method Summary
Modifier and Type Method Description abstract LongcreationTime()Returns the time when this session was created. abstract LonglastAccessedTime()Returns the last time the client sent a request associated with this session. abstract Stringid()A string containing the unique identifier assigned to this session (Cookie). abstract IntegermaxInactiveInterval()Returns the maximum time interval in seconds between client accesses after which the session will be invalidated. abstract UnitmaxInactiveInterval(Integer value)Sets the time, in seconds, between client requests before the session is invalidated. abstract Map<String, Object>attributes()Returns a Map of attribute object bound to this session. abstract ObjectgetAttribute(String name)Returns the attribute object bound to this session by the given name. abstract UnitsetAttribute(String name, Object value)Sets a attribute object to this session with the given name. abstract UnitremoveAttribute(String name)Removes the bound object from the session attribute with the specified name. abstract Unitinvalidate()Invalidates this session then unbinds any objects bound to it. abstract BooleanisNew()Returns <code>true</code> if the client does not yet know about the session or if the client chooses not to join the session. -
-
Method Detail
-
creationTime
abstract Long creationTime()
Returns the time when this session was created.
-
lastAccessedTime
abstract Long lastAccessedTime()
Returns the last time the client sent a request associated with this session.
-
id
abstract String id()
A string containing the unique identifier assigned to this session (Cookie).
-
maxInactiveInterval
abstract Integer maxInactiveInterval()
Returns the maximum time interval in seconds between client accesses after which the session will be invalidated.
-
maxInactiveInterval
abstract Unit maxInactiveInterval(Integer value)
Sets the time, in seconds, between client requests before the session is invalidated.
- Parameters:
value- Maximum inactive time interval in seconds.
-
attributes
abstract Map<String, Object> attributes()
Returns a Map of attribute object bound to this session.
-
getAttribute
abstract Object getAttribute(String name)
Returns the attribute object bound to this session by the given name.
- Parameters:
name- String specifying the name of the object.
-
setAttribute
abstract Unit setAttribute(String name, Object value)
Sets a attribute object to this session with the given name.
- Parameters:
name- String specifying the name of the object.value- The object to be bound.
-
removeAttribute
abstract Unit removeAttribute(String name)
Removes the bound object from the session attribute with the specified name.
- Parameters:
name- String specifying the name of the object.
-
invalidate
abstract Unit invalidate()
Invalidates this session then unbinds any objects bound to it.
-
-
-
-