Class HttpSession
- java.lang.Object
-
- com.kttdevelopment.simplehttpserver.HttpSession
-
public abstract class HttpSession extends Object
A session keeps track of a single client across multiple exchanges. This is typically used for login persistence.- Since:
- 02.00.00
- Version:
- 03.04.01
- Author:
- Ktt Development
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHttpSession()Creates an emptyHttpSession.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract longgetCreationTime()Returns when the session was created.abstract longgetLastAccessTime()Returns when the session was last used.abstract StringgetSessionID()Returns the session id.abstract voidupdateLastAccessTime()Updates the last access time for the session
-
-
-
Constructor Detail
-
HttpSession
protected HttpSession()
Creates an emptyHttpSession. Sessions are usually created byHttpSessionHandler.getSession(HttpExchange).- Since:
- 02.00.00
-
-
Method Detail
-
getSessionID
public abstract String getSessionID()
Returns the session id.- Returns:
- session id
- Since:
- 02.00.00
-
getCreationTime
public abstract long getCreationTime()
Returns when the session was created.- Returns:
- creation time
- Since:
- 02.00.00
-
getLastAccessTime
public abstract long getLastAccessTime()
Returns when the session was last used.- Returns:
- last access time
- Since:
- 02.00.00
-
updateLastAccessTime
public abstract void updateLastAccessTime()
Updates the last access time for the session- Since:
- 02.00.00
-
-