public class DefaultConfigurator extends Object implements ClientConfigurator
DefaultConfigurator handles basic configuration of clients under different environments. This is the configurator used by the REST client factory when no configurator is provided by the SDK user.
It currently does the following:
If the default configurator results in any issues, callers can provide their own implementation when constructing service objects.
Modifier and Type | Class and Description |
---|---|
static class |
DefaultConfigurator.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
ClientConfigDecorator s to support the ability to decorate ClientConfig |
Constructor and Description |
---|
DefaultConfigurator()
Creates a new
DefaultConfigurator object. |
DefaultConfigurator(List<ClientConfigDecorator> clientConfigDecorators)
Creates a new
DefaultConfigurator 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.
|
protected void |
setConnectorProvider(javax.ws.rs.client.ClientBuilder builder)
Sets the custom ConnectorProvider to use.
|
protected void |
setSslContext(javax.ws.rs.client.ClientBuilder builder)
Sets the SSL context on the builder.
|
protected final List<ClientConfigDecorator> clientConfigDecorators
The list of ClientConfigDecorator
s to support the ability to decorate ClientConfig
public DefaultConfigurator()
Creates a new DefaultConfigurator
object.
public DefaultConfigurator(List<ClientConfigDecorator> clientConfigDecorators)
Creates a new DefaultConfigurator
object.
clientConfigDecorators
- a list of client config decoratorspublic void customizeBuilder(javax.ws.rs.client.ClientBuilder builder)
ClientConfigurator
Customize the ClientBuilder instance.
customizeBuilder
in interface ClientConfigurator
builder
- The client builder.protected void setSslContext(javax.ws.rs.client.ClientBuilder builder)
Sets the SSL context on the builder.
Separate so subclasses can call if desired.
builder
- The client builder to use.protected 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.
builder
- The builder to set the provider onpublic void customizeClient(javax.ws.rs.client.Client client)
ClientConfigurator
Customize the Client generated by the builder.
customizeClient
in interface ClientConfigurator
client
- The client.Copyright © 2016–2019. All rights reserved.