-
- All Implemented Interfaces:
-
com.hexagonkt.http.server.SessionPort
public class UnsupportedSessionAdapter implements SessionPort
-
-
Field Summary
Fields Modifier and Type Field Description public final static UnsupportedSessionAdapterINSTANCE
-
Method Summary
Modifier and Type Method Description LongcreationTime()Returns the time when this session was created. LonglastAccessedTime()Returns the last time the client sent a request associated with this session. Stringid()A string containing the unique identifier assigned to this session (Cookie). IntegermaxInactiveInterval()Returns the maximum time interval in seconds between client accesses after which the session will be invalidated. UnitmaxInactiveInterval(Integer value)Sets the time, in seconds, between client requests before the session is invalidated. Map<String, Object>attributes()Returns a Map of attribute object bound to this session. ObjectgetAttribute(String name)Returns the attribute object bound to this session by the given name. UnitsetAttribute(String name, Object value)Sets a attribute object to this session with the given name. UnitremoveAttribute(String name)Removes the bound object from the session attribute with the specified name. Unitinvalidate()Invalidates this session then unbinds any objects bound to it. 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
Long creationTime()
Returns the time when this session was created.
-
lastAccessedTime
Long lastAccessedTime()
Returns the last time the client sent a request associated with this session.
-
maxInactiveInterval
Integer maxInactiveInterval()
Returns the maximum time interval in seconds between client accesses after which the session will be invalidated.
-
maxInactiveInterval
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
Map<String, Object> attributes()
Returns a Map of attribute object bound to this session.
-
getAttribute
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
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
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
Unit invalidate()
Invalidates this session then unbinds any objects bound to it.
-
-
-
-