public class RestClientFactoryBuilder extends Object
Builder for RestClientFactory
. Will use default values
when no other values were provided.
Modifier and Type | Field and Description |
---|---|
static ClientConfigurator |
DEFAULT_CONFIGURATOR |
Modifier | Constructor and Description |
---|---|
protected |
RestClientFactoryBuilder() |
Modifier and Type | Method and Description |
---|---|
RestClientFactoryBuilder |
additionalClientConfigurators(ClientConfigurator... clientConfigurators)
Adds client configurators, which will be run after the client configurators that have already been registered.
|
RestClientFactoryBuilder |
additionalClientConfigurators(List<ClientConfigurator> clientConfigurators)
Adds client configurators, which will be run after the client configurators that have already been registered.
|
RestClientFactory |
build()
Builds a new RestClientFactory using the options provided.
|
static RestClientFactoryBuilder |
builder()
Create a new builder instance.
|
RestClientFactoryBuilder |
clientConfigurator(ClientConfigurator clientConfigurator)
Sets the ClientConfigurator to use, or null to use the default client configurator.
|
RestClientFactoryBuilder |
defaultConfigurator(ClientConfigurator defaultConfigurator)
Sets the default ClientConfigurator.
|
protected List<ClientConfigurator> |
getAdditionalClientConfigurators() |
protected ClientConfigurator |
getClientConfigurator() |
public static final ClientConfigurator DEFAULT_CONFIGURATOR
public static RestClientFactoryBuilder builder()
Create a new builder instance.
public RestClientFactoryBuilder defaultConfigurator(ClientConfigurator defaultConfigurator)
Sets the default ClientConfigurator.
defaultConfigurator
- the ClientConfigurator
used if null is passed to the clientConfigurator methodpublic RestClientFactoryBuilder clientConfigurator(ClientConfigurator clientConfigurator)
Sets the ClientConfigurator to use, or null to use the default client configurator.
Setting a non-null client configurator will completely replace the existing client configurator, and also not use the default client configurator.
clientConfigurator
- The client configurator to use.public RestClientFactoryBuilder additionalClientConfigurators(ClientConfigurator... clientConfigurators)
Adds client configurators, which will be run after the client configurators that have already been registered.
clientConfigurators
- The list of client configurator to run after the other client configurators.public RestClientFactoryBuilder additionalClientConfigurators(List<ClientConfigurator> clientConfigurators)
Adds client configurators, which will be run after the client configurators that have already been registered.
clientConfigurators
- The list of client configurator to run after the other client configurators.public RestClientFactory build()
Builds a new RestClientFactory using the options provided. Options that were not set will use default values.
protected ClientConfigurator getClientConfigurator()
protected List<ClientConfigurator> getAdditionalClientConfigurators()
Copyright © 2016–2022. All rights reserved.