Package 

Interface SessionPort

  • All Implemented Interfaces:

    
    public interface SessionPort
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Long creationTime() Returns the time when this session was created.
      abstract Long lastAccessedTime() Returns the last time the client sent a request associated with this session.
      abstract String id() A string containing the unique identifier assigned to this session (Cookie).
      abstract Integer maxInactiveInterval() Returns the maximum time interval in seconds between client accesses after which the session will be invalidated.
      abstract Unit maxInactiveInterval(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 Object getAttribute(String name) Returns the attribute object bound to this session by the given name.
      abstract Unit setAttribute(String name, Object value) Sets a attribute object to this session with the given name.
      abstract Unit removeAttribute(String name) Removes the bound object from the session attribute with the specified name.
      abstract Unit invalidate() Invalidates this session then unbinds any objects bound to it.
      abstract Boolean isNew() Returns <code>true</code> if the client does not yet know about the session or if the client chooses not to join the session.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.
      • 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.

      • isNew

         abstract Boolean isNew()

        Returns <code>true</code> if the client does not yet know about the session or if the client chooses not to join the session.