public class Session
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Session.Cookie
Session cookie properties.
|
static class |
Session.SessionTrackingMode
Available session tracking modes (mirrors
SessionTrackingMode . |
Constructor and Description |
---|
Session() |
Modifier and Type | Method and Description |
---|---|
Session.Cookie |
getCookie() |
java.io.File |
getStoreDir()
Return the directory used to store session data.
|
java.time.Duration |
getTimeout() |
java.util.Set<Session.SessionTrackingMode> |
getTrackingModes()
Return the
session tracking modes . |
boolean |
isPersistent()
Return whether to persist session data between restarts.
|
void |
setPersistent(boolean persistent) |
void |
setStoreDir(java.io.File storeDir) |
void |
setTimeout(java.time.Duration timeout) |
void |
setTrackingModes(java.util.Set<Session.SessionTrackingMode> trackingModes) |
public java.time.Duration getTimeout()
public void setTimeout(java.time.Duration timeout)
public java.util.Set<Session.SessionTrackingMode> getTrackingModes()
session tracking modes
.public void setTrackingModes(java.util.Set<Session.SessionTrackingMode> trackingModes)
public boolean isPersistent()
true
to persist session data between restarts.public void setPersistent(boolean persistent)
public java.io.File getStoreDir()
public void setStoreDir(java.io.File storeDir)
public Session.Cookie getCookie()