Top Description Methods
org.apache.hc.client5.http

public Interface UserTokenHandler

Known Direct Implementers
org.apache.hc.client5.http.impl.DefaultUserTokenHandler, org.apache.hc.client5.http.impl.NoopUserTokenHandler
Annotations
@Contract
threading:STATELESS
Imports
org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.HttpRequest, org.apache.hc.core5.http.protocol.HttpContext

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 be null 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

Modifier and TypeMethod and Description
public Object

Returns:

user token that uniquely identifies the user or null if the context is not user specific.
getUserToken
(HttpRoute
HTTP route
route
,
HttpContext
the execution context
context
)

The token object returned by this method is expected to uniquely identify the current user if the context is user specific or to be null if it is not.

public default Object

Returns:

user token that uniquely identifies the user or null if the context is not user specific.
getUserToken
(HttpRoute
HTTP route
route
,
HttpRequest
HTTP request
request
,
HttpContext
the execution context
context
)

The token object returned by this method is expected to uniquely identify the current user if the context is user specific or to be null if it is not.

Method Detail

getUserTokenback to summary
public Object getUserToken(HttpRoute route, 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 be null if it is not.

Parameters
route:HttpRoute

HTTP route

context:HttpContext

the execution context

Returns:Object

user token that uniquely identifies the user or null if the context is not user specific.

getUserTokenback to summary
public default Object getUserToken(HttpRoute route, HttpRequest request, 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 be null if it is not.

Parameters
route:HttpRoute

HTTP route

request:HttpRequest

HTTP request

context:HttpContext

the execution context

Returns:Object

user token that uniquely identifies the user or null if the context is not user specific.

Since
5.2