public class HeaderWebSessionIdResolver extends java.lang.Object implements WebSessionIdResolver
WebSessionIdResolver
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_HEADER_NAME
Default value for
setHeaderName(String) . |
Constructor and Description |
---|
HeaderWebSessionIdResolver() |
Modifier and Type | Method and Description |
---|---|
void |
expireSession(ServerWebExchange exchange)
Instruct the client to end the current session.
|
java.lang.String |
getHeaderName()
Return the configured header name.
|
java.util.List<java.lang.String> |
resolveSessionIds(ServerWebExchange exchange)
Resolve the session id's associated with the request.
|
void |
setHeaderName(java.lang.String headerName)
Set the name of the session header to use for the session id.
|
void |
setSessionId(ServerWebExchange exchange,
java.lang.String id)
Send the given session id to the client.
|
public static final java.lang.String DEFAULT_HEADER_NAME
setHeaderName(String)
.public void setHeaderName(java.lang.String headerName)
By default set to DEFAULT_HEADER_NAME
headerName
- the header namepublic java.lang.String getHeaderName()
public java.util.List<java.lang.String> resolveSessionIds(ServerWebExchange exchange)
WebSessionIdResolver
resolveSessionIds
in interface WebSessionIdResolver
exchange
- the current exchangepublic void setSessionId(ServerWebExchange exchange, java.lang.String id)
WebSessionIdResolver
setSessionId
in interface WebSessionIdResolver
exchange
- the current exchangeid
- the session idpublic void expireSession(ServerWebExchange exchange)
WebSessionIdResolver
expireSession
in interface WebSessionIdResolver
exchange
- the current exchange