Package org.apache.hc.client5.http
Interface UserTokenHandler
-
- All Known Implementing Classes:
DefaultUserTokenHandler
,NoopUserTokenHandler
@Contract(threading=STATELESS) public interface UserTokenHandler
A handler for determining if the given execution context is user specific or not. The token object returned by this handler is expected to uniquely identify the current user if the context is user specific or to benull
if the context does not contain any resources or details specific to the current user.The user token will be used to ensure that user specific resources will not be shared with or reused by other users.
- Since:
- 4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.Object
getUserToken(HttpRoute route, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context)
The token object returned by this method is expected to uniquely identify the current user if the context is user specific or to benull
if it is not.java.lang.Object
getUserToken(HttpRoute route, org.apache.hc.core5.http.protocol.HttpContext context)
The token object returned by this method is expected to uniquely identify the current user if the context is user specific or to benull
if it is not.
-
-
-
Method Detail
-
getUserToken
java.lang.Object getUserToken(HttpRoute route, org.apache.hc.core5.http.protocol.HttpContext context)
The token object returned by this method is expected to uniquely identify the current user if the context is user specific or to benull
if it is not.- Parameters:
route
- HTTP routecontext
- the execution context- Returns:
- user token that uniquely identifies the user or
null
if the context is not user specific.
-
getUserToken
default java.lang.Object getUserToken(HttpRoute route, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context)
The token object returned by this method is expected to uniquely identify the current user if the context is user specific or to benull
if it is not.- Parameters:
route
- HTTP routerequest
- HTTP requestcontext
- the execution context- Returns:
- user token that uniquely identifies the user or
null
if the context is not user specific. - Since:
- 5.2
-
-