Class Session

Direct Known Subclasses:
FileSession

public class Session extends AbstractSession
The Class Session. Provides unique id and an attribute map to store data. A session represents virtual relation between a client and a server. Session activity is observed by a timer. The timer gets initialized when adding the session to the registry. It gets reseted when session is used by requests.
  • Constructor Details

    • Session

      public Session(String sessionInfo, String ipAdressList)
      Instantiates a new session.
      Parameters:
      sessionInfo - the session info
      ipAdressList - the ip adress list
  • Method Details

    • setSessionTimeoutMillis

      public void setSessionTimeoutMillis(double sessionTimeoutMillis)
      Sets the session timeout seconds.
      Parameters:
      sessionTimeoutMillis - the new session timeout seconds
    • getSessionTimeoutMillis

      public double getSessionTimeoutMillis()
      Gets the session timeout seconds.
      Returns:
      the session timeout seconds
    • getStatefulServer

      public StatefulServer getStatefulServer()
      Gets the stateful server.
      Returns:
      the stateful server
    • setPendingRequest

      public void setPendingRequest(boolean pendingRequest)
      Sets the pending request. Careful in use - take care of synchronization.
      Parameters:
      pendingRequest - the new pending request
    • hasPendingRequest

      public boolean hasPendingRequest()
      Gets the pending request. Careful in use - take care of synchronization. setPendingRequest
      Returns:
      the pending request
    • getLastExecuteTime

      public Date getLastExecuteTime()
      Gets the last execute time.
      Returns:
      the last execute time
    • resetExecuteTime

      public void resetExecuteTime()
      Reset execute time.
    • dump

      public void dump(XMLDumpWriter writer) throws Exception
      Dump the session into the xml writer.
      Specified by:
      dump in class AbstractSession
      Parameters:
      writer - the writer
      Throws:
      Exception - the exception