java.lang.Object
org.bzdev.ejws.EjwsSession
Object representing an EJWS session.
The object provides information about a session.
-
Method Summary
Modifier and TypeMethodDescriptionlong
Get the session creation time.getID()
Get the session ID.long
Get the session's last-accessed time.int
Get the maximum time interval over which a session can be inactiveboolean
isNew()
Determine if the session ID is a new session ID.void
setMaxInactiveInterval
(int value) Set the maximum time interval over which a session can be inactive.
-
Method Details
-
getID
Get the session ID.- Returns:
- the session ID
-
getCreationTime
public long getCreationTime()Get the session creation time. Time is measured in seconds, starting at midnight, January 1, 1970 UTC.- Returns:
- the session creation time.
-
getLastAccessedTime
public long getLastAccessedTime()Get the session's last-accessed time. Time is measured in seconds, starting at midnight, January 1, 1970 UTC.- Returns:
- the session last-accessed time.
-
getMaxInactiveInterval
public int getMaxInactiveInterval()Get the maximum time interval over which a session can be inactive- Returns:
- the time interval in seconds; 0 if no limit
-
setMaxInactiveInterval
public void setMaxInactiveInterval(int value) Set the maximum time interval over which a session can be inactive.This method is called by
HttpServerRequest.setMaxInactiveInterval(int)
andWebMap.RequestInfo.setMaxInactiveInterval(int)
: instances ofEjwsSession
are normally not visible outside of this package.- Parameters:
value
- the time interval in seconds
-
isNew
public boolean isNew()Determine if the session ID is a new session ID.- Returns:
- true if the session ID is a new ID; false otherwise
-