public interface ExpiringSession extends Session
Session
that contains additional attributes that are useful for determining
if a session is expired.Modifier and Type | Method and Description |
---|---|
long |
getCreationTime()
Gets the time when this session was created in milliseconds since midnight of
1/1/1970 GMT.
|
long |
getLastAccessedTime()
Gets the last time this
Session was accessed expressed in milliseconds
since midnight of 1/1/1970 GMT. |
int |
getMaxInactiveIntervalInSeconds()
Gets the maximum inactive interval in seconds between requests before this session
will be invalidated.
|
boolean |
isExpired()
Returns true if the session is expired.
|
void |
setLastAccessedTime(long lastAccessedTime)
Sets the last accessed time in milliseconds since midnight of 1/1/1970 GMT.
|
void |
setMaxInactiveIntervalInSeconds(int interval)
Sets the maximum inactive interval in seconds between requests before this session
will be invalidated.
|
getAttribute, getAttributeNames, getId, removeAttribute, setAttribute
long getCreationTime()
void setLastAccessedTime(long lastAccessedTime)
lastAccessedTime
- the last accessed time in milliseconds since midnight of
1/1/1970 GMTlong getLastAccessedTime()
Session
was accessed expressed in milliseconds
since midnight of 1/1/1970 GMT.void setMaxInactiveIntervalInSeconds(int interval)
interval
- the number of seconds that the Session
should be kept alive
between client requests.int getMaxInactiveIntervalInSeconds()
boolean isExpired()