Class Session
- java.lang.Object
- org.springframework.boot.web.servlet.server.Session
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Session.Cookie
Cookie properties.static class
Session.SessionTrackingMode
Available session tracking modes (mirrorsSessionTrackingMode
.
Constructor Summary
Constructors Constructor Description Session()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Session.Cookie
getCookie()
File
getStoreDir()
Return the directory used to store session data.Duration
getTimeout()
Set<Session.SessionTrackingMode>
getTrackingModes()
Return thesession tracking modes
.boolean
isPersistent()
Return whether to persist session data between restarts.void
setPersistent(boolean persistent)
void
setStoreDir(File storeDir)
void
setTimeout(Duration timeout)
void
setTrackingModes(Set<Session.SessionTrackingMode> trackingModes)
Constructor Detail
Session
public Session()
Method Detail
getCookie
public Session.Cookie getCookie()
getTimeout
public Duration getTimeout()
setTimeout
public void setTimeout(Duration timeout)
getTrackingModes
public Set<Session.SessionTrackingMode> getTrackingModes()
Return thesession tracking modes
.- Returns:
- the session tracking modes
setTrackingModes
public void setTrackingModes(Set<Session.SessionTrackingMode> trackingModes)
isPersistent
public boolean isPersistent()
Return whether to persist session data between restarts.- Returns:
true
to persist session data between restarts.
setPersistent
public void setPersistent(boolean persistent)
getStoreDir
public File getStoreDir()
Return the directory used to store session data.- Returns:
- the session data store directory
setStoreDir
public void setStoreDir(File storeDir)