public class JerseyDefaultConnectorConfigurator extends Object implements ClientConfigurator, SetsClientBuilderProperties
JerseyDefaultConnectorConfigurator handles basic configuration of clients under different environments. It currently does the following:
If the JerseyDefaultConnectorConfigurator results in any issues, callers can provide their own implementation when constructing service objects.
| Modifier and Type | Class and Description |
|---|---|
static class |
JerseyDefaultConnectorConfigurator.NonBuffering
A
ClientConfigurator for a client that does not buffer requests in memory. |
| Modifier and Type | Field and Description |
|---|---|
protected List<ClientConfigDecorator> |
clientConfigDecorators
The list of
ClientConfigDecorators to support the ability to decorate ClientConfig |
| Constructor and Description |
|---|
JerseyDefaultConnectorConfigurator()
Creates a new
JerseyDefaultConnectorConfigurator object. |
JerseyDefaultConnectorConfigurator(List<ClientConfigDecorator> clientConfigDecorators)
Creates a new
JerseyDefaultConnectorConfigurator object. |
| Modifier and Type | Method and Description |
|---|---|
void |
customizeBuilder(javax.ws.rs.client.ClientBuilder builder)
Customize the ClientBuilder instance.
|
void |
customizeClient(javax.ws.rs.client.Client client)
Customize the Client generated by the builder.
|
void |
setConnectorProvider(javax.ws.rs.client.ClientBuilder builder)
Sets the custom ConnectorProvider to use.
|
void |
setSslContext(javax.ws.rs.client.ClientBuilder builder)
Sets the SSL context on the builder.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcustomizeRequestprotected final List<ClientConfigDecorator> clientConfigDecorators
The list of ClientConfigDecorators to support the ability to decorate ClientConfig
public JerseyDefaultConnectorConfigurator()
Creates a new JerseyDefaultConnectorConfigurator object.
public JerseyDefaultConnectorConfigurator(List<ClientConfigDecorator> clientConfigDecorators)
Creates a new JerseyDefaultConnectorConfigurator object.
clientConfigDecorators - a list of client config decoratorspublic void customizeBuilder(javax.ws.rs.client.ClientBuilder builder)
ClientConfiguratorCustomize the ClientBuilder instance.
customizeBuilder in interface ClientConfiguratorbuilder - The client builder.public void setSslContext(javax.ws.rs.client.ClientBuilder builder)
Sets the SSL context on the builder.
Separate so subclasses can call if desired.
setSslContext in interface SetsClientBuilderPropertiesbuilder - The client builder to use.public void setConnectorProvider(javax.ws.rs.client.ClientBuilder builder)
Sets the custom ConnectorProvider to use. Subclasses can override this to be a no-op if they do not want to use the custom connector, or wish to set their own.
setConnectorProvider in interface SetsClientBuilderPropertiesbuilder - The builder to set the provider onpublic void customizeClient(javax.ws.rs.client.Client client)
ClientConfiguratorCustomize the Client generated by the builder.
customizeClient in interface ClientConfiguratorclient - The client.Copyright © 2016–2022. All rights reserved.