Interface GrizzlyConnectorProvider.RequestCustomizer
- Enclosing class:
- GrizzlyConnectorProvider
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 registered globally
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.
-
Method Summary
Modifier and TypeMethodDescriptioncom.ning.http.client.RequestBuilder
customize
(ClientRequest requestContext, com.ning.http.client.RequestBuilder requestBuilder) Customize the underlying Async HTTP Client request builder associated with a specific Jersey client request.
-
Method Details
-
customize
com.ning.http.client.RequestBuilder customize(ClientRequest requestContext, com.ning.http.client.RequestBuilder requestBuilder) Customize the underlying Async HTTP Client request builder associated with a specific Jersey client request.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.
- Parameters:
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.- Returns:
- Async HTTP Client request builder instance that will be used to build the actual Async HTTP Client
request instance sent for execution. Typically, the method returns the same
requestBuilder
instance that has been passed into the method as an input parameter, but it is not required to do so.
-