Package ratpack.session
Interface SessionId
-
public interface SessionIdA handle to the session ID.It is generally not necessary to use this type directly. It is used by the provided impl of
Sessionto discover (and generate) the session ID.The
SessionModuleprovides a default implementation of this type that usesSessionIdGenerator, and a cookie, based onSessionCookieConfigto store the session id.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static SessionIdconstant(io.netty.util.AsciiString value)A session ID that always returns the same value.static SessionIdempty()A session ID that is always empty.io.netty.util.AsciiStringgetValue()Get the session ID value, generating a new one if necessary.voidterminate()Terminate the current session id, disassociating it from the current user.
-
-
-
Method Detail
-
getValue
io.netty.util.AsciiString getValue()
Get the session ID value, generating a new one if necessary.- Returns:
- the session id value
-
terminate
void terminate()
Terminate the current session id, disassociating it from the current user.
-
constant
static SessionId constant(io.netty.util.AsciiString value)
A session ID that always returns the same value. Suitable to use if no session ID is required, and if using client side sessions.- Parameters:
value- the session ID value- Returns:
- the session ID
- Since:
- 1.7
-
empty
static SessionId empty()
A session ID that is always empty. Suitable to use if no session ID is required, and if using client side sessions.- Returns:
- the session ID
- Since:
- 1.7
-
-