public class RestClientFactory extends Object
RestClientFactory is responsible for creating a new REST client whenever a specific service instance is created. The factory will configure all of the required filters and configuration options.
Constructor and Description |
---|
RestClientFactory(ClientConfigurator clientConfigurator)
Creates a new REST client factor that allow the given configurator to
register any additional handlers it wants to the underlying REST client.
|
Modifier and Type | Method and Description |
---|---|
RestClient |
create(RequestSigner requestSigner)
Deprecated.
use
create(RequestSigner, Map) instead |
RestClient |
create(RequestSigner requestSigner,
ClientConfiguration configuration)
Deprecated.
use
create(RequestSigner, Map, ClientConfiguration) instead |
RestClient |
create(RequestSigner defaultRequestSigner,
Map<SigningStrategy,RequestSigner> requestSigners)
Creates a new client that will use the given
AuthenticationDetailsProvider . |
RestClient |
create(RequestSigner defaultRequestSigner,
Map<SigningStrategy,RequestSigner> requestSigners,
ClientConfiguration configuration)
Creates a new client that will use the given
AuthenticationDetailsProvider . |
RestClient |
create(RequestSigner defaultRequestSigner,
Map<SigningStrategy,RequestSigner> requestSigners,
ClientConfiguration configuration,
boolean isNonBuffering)
Creates a new client that will use the given
AuthenticationDetailsProvider and ClientConfiguration . |
RestClient |
create(RequestSigner defaultRequestSigner,
Map<SigningStrategy,RequestSigner> requestSigners,
ClientConfiguration configuration,
boolean isNonBuffering,
JaxRsCircuitBreaker circuitBreaker)
Creates a new client that will use the given
AuthenticationDetailsProvider and ClientConfiguration . |
RestClient |
create(RequestSigner defaultRequestSigner,
Map<SigningStrategy,RequestSigner> requestSigners,
ClientConfiguration configuration,
boolean isNonBuffering,
JaxRsCircuitBreaker circuitBreaker,
CircuitBreakerConfiguration circuitBreakerConfiguration)
Creates a new client that will use the given
AuthenticationDetailsProvider and ClientConfiguration . |
ClientConfigurator |
getClientConfigurator() |
static com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper()
Deprecated.
use com.oracle.bmc.http.Serialization.getObjectMapper() instead
|
public RestClientFactory(@Nonnull ClientConfigurator clientConfigurator)
Creates a new REST client factor that allow the given configurator to register any additional handlers it wants to the underlying REST client.
clientConfigurator
- The configurator to customize the REST client.@Deprecated public RestClient create(RequestSigner requestSigner)
create(RequestSigner, Map)
insteadCreates a new client that will use the given
AuthenticationDetailsProvider
.
requestSigner
- The strategy used to sign requests.@Deprecated public RestClient create(RequestSigner requestSigner, ClientConfiguration configuration)
create(RequestSigner, Map, ClientConfiguration)
insteadCreates a new client that will use the given
AuthenticationDetailsProvider
and ClientConfiguration
.
requestSigner
- The strategy used to sign requests.configuration
- The client configuration to use, or null for default
configuration.public RestClient create(RequestSigner defaultRequestSigner, Map<SigningStrategy,RequestSigner> requestSigners)
Creates a new client that will use the given
AuthenticationDetailsProvider
.
defaultRequestSigner
- The default strategy used to sign requests.requestSigners
- The strategies used to sign requests, per signing strategy.public RestClient create(RequestSigner defaultRequestSigner, Map<SigningStrategy,RequestSigner> requestSigners, ClientConfiguration configuration)
Creates a new client that will use the given
AuthenticationDetailsProvider
.
defaultRequestSigner
- The default strategy used to sign requests.requestSigners
- The strategies used to sign requests, per signing strategy.configuration
- The client configuration to use, or null for default configuration.public RestClient create(RequestSigner defaultRequestSigner, Map<SigningStrategy,RequestSigner> requestSigners, ClientConfiguration configuration, boolean isNonBuffering)
Creates a new client that will use the given
AuthenticationDetailsProvider
and ClientConfiguration
.
defaultRequestSigner
- The default strategy used to sign requests.requestSigners
- The strategies used to sign requests, per signing strategy.configuration
- The client configuration to use, or null for default
configuration.isNonBuffering
- The boolean value indicating if entities should be bufferedpublic RestClient create(RequestSigner defaultRequestSigner, Map<SigningStrategy,RequestSigner> requestSigners, ClientConfiguration configuration, boolean isNonBuffering, JaxRsCircuitBreaker circuitBreaker)
Creates a new client that will use the given
AuthenticationDetailsProvider
and ClientConfiguration
.
defaultRequestSigner
- The default strategy used to sign requests.requestSigners
- The strategies used to sign requests, per signing strategy.configuration
- The client configuration to use, or null for default
configuration.isNonBuffering
- The boolean value indicating if entities should be buffered.circuitBreaker
- The circuit breaker to use.public RestClient create(RequestSigner defaultRequestSigner, Map<SigningStrategy,RequestSigner> requestSigners, ClientConfiguration configuration, boolean isNonBuffering, JaxRsCircuitBreaker circuitBreaker, CircuitBreakerConfiguration circuitBreakerConfiguration)
Creates a new client that will use the given
AuthenticationDetailsProvider
and ClientConfiguration
.
defaultRequestSigner
- The default strategy used to sign requests.requestSigners
- The strategies used to sign requests, per signing strategy.configuration
- The client configuration to use, or null for default
configuration.isNonBuffering
- The boolean value indicating if entities should be buffered.circuitBreakerConfiguration
- The circuit breaker configuration to use.@Deprecated public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
Returns the ObjectMapper used to handle JSON requests.
Exposed only for internal use.
public ClientConfigurator getClientConfigurator()
Copyright © 2016–2024. All rights reserved.