public static interface GrizzlyConnectorProvider.RequestCustomizer
Before a request is built and sent for execution, a registered request customizer
implementation can update the Async HTTP Client
request builder used
to build the request instance ultimately sent for processing.
An instance of the request customizer can be either
for all requests by registering the customizer in the Jersey client configuration, or it can be individually
registered per request, by registering it into a specific
invocation builder instance. In case of a conflict when one instance is registered globally and another per request, the
per request registered customizer takes precedence and the global customizer will be ignored.
|Modifier and Type||Method and Description|
Customize the underlying Async HTTP Client request builder associated with a specific Jersey client request.
com.ning.http.client.RequestBuilder customize(ClientRequest requestContext, com.ning.http.client.RequestBuilder requestBuilder)
The request builder instance returned from the method will be subsequently used to build the actual Async HTTP Client request instance sent for execution.
Note that any JAX-RS and Jersey specific request configuration updates on the request builder happen before this method is invoked. As such, changes made to the request builder may override or cancel the effect of the JAX-RS and Jersey specific request configuration changes. As such any request builder changes should be made with care and implementers should be aware of possible side effect of their changes.
requestContext- Jersey client request instance for which the Async HTTP Client request is being built.
requestBuilder- Async HTTP Client request builder for the Jersey request.
requestBuilderinstance that has been passed into the method as an input parameter, but it is not required to do so.
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.