Module io.inverno.mod.session.http
Package io.inverno.mod.session.http
Class CookieSessionIdExtractor<A extends ExchangeContext,B extends Exchange<A>>
java.lang.Object
io.inverno.mod.session.http.CookieSessionIdExtractor<A,B>
- Type Parameters:
A
- the exchange context typeB
- the exchange type
- All Implemented Interfaces:
SessionIdExtractor<A,
B>
public class CookieSessionIdExtractor<A extends ExchangeContext,B extends Exchange<A>>
extends Object
implements SessionIdExtractor<A,B>
A session identifier extractor that extracts the identifier from a request cookie.
- Since:
- 1.13
- Author:
- Jeremy Kuhn
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a cookie session identifier extractor with the default session cookie name.CookieSessionIdExtractor
(String sessionCookie) Creates a cookie session identifier extractor with the specified session cookie name. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.inverno.mod.session.http.SessionIdExtractor
or
-
Field Details
-
DEFAULT_COOKIE_NAME
The default session cookie name.This constant is also used in
CookieSessionInjector
.- See Also:
-
-
Constructor Details
-
CookieSessionIdExtractor
public CookieSessionIdExtractor()Creates a cookie session identifier extractor with the default session cookie name.
-
CookieSessionIdExtractor
Creates a cookie session identifier extractor with the specified session cookie name.
- Parameters:
sessionCookie
- the session cookie name
-
-
Method Details
-
getSessionCookie
Returns the session cookie name.
- Returns:
- the session cookie name
-
extract
Description copied from interface:SessionIdExtractor
Extracts the session identifier from the specified exchange.
- Specified by:
extract
in interfaceSessionIdExtractor<A extends ExchangeContext,
B extends Exchange<A>> - Parameters:
exchange
- the exchange- Returns:
- a mono emitting the session identifier or an empty mono if the exchange didn't provide any session identifier
-