Package com.oracle.bmc.http
Class JerseyDefaultConnectorConfigurator
- java.lang.Object
-
- com.oracle.bmc.http.JerseyDefaultConnectorConfigurator
-
- All Implemented Interfaces:
ClientConfigurator,SetsClientBuilderProperties
- Direct Known Subclasses:
JerseyDefaultConnectorConfigurator.NonBuffering
public class JerseyDefaultConnectorConfigurator extends Object implements ClientConfigurator, SetsClientBuilderProperties
JerseyDefaultConnectorConfigurator handles basic configuration of clients under different environments.It currently does the following:
- Sets the SSL context to use TLS 1.2 if running on Java7
- Updates the client to use a custom connector that allows large objects to be uploaded without buffering
If the JerseyDefaultConnectorConfigurator results in any issues, callers can provide their own implementation when constructing service objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJerseyDefaultConnectorConfigurator.NonBufferingAClientConfiguratorfor a client that does not buffer requests in memory.
-
Field Summary
Fields Modifier and Type Field Description protected List<ClientConfigDecorator>clientConfigDecoratorsThe list of ClientConfigDecorators to support the ability to decorate ClientConfig
-
Constructor Summary
Constructors Constructor Description JerseyDefaultConnectorConfigurator()Creates a new JerseyDefaultConnectorConfigurator object.JerseyDefaultConnectorConfigurator(List<ClientConfigDecorator> clientConfigDecorators)Creates a new JerseyDefaultConnectorConfigurator object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcustomizeBuilder(javax.ws.rs.client.ClientBuilder builder)Customize the ClientBuilder instance.voidcustomizeClient(javax.ws.rs.client.Client client)Customize the Client generated by the builder.voidsetConnectorProvider(javax.ws.rs.client.ClientBuilder builder)Sets the custom ConnectorProvider to use.voidsetSslContext(javax.ws.rs.client.ClientBuilder builder)Sets the SSL context on the builder.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.oracle.bmc.http.ClientConfigurator
customizeRequest
-
-
-
-
Field Detail
-
clientConfigDecorators
protected final List<ClientConfigDecorator> clientConfigDecorators
The list of ClientConfigDecorators to support the ability to decorate ClientConfig
-
-
Constructor Detail
-
JerseyDefaultConnectorConfigurator
public JerseyDefaultConnectorConfigurator()
Creates a new JerseyDefaultConnectorConfigurator object.
-
JerseyDefaultConnectorConfigurator
public JerseyDefaultConnectorConfigurator(List<ClientConfigDecorator> clientConfigDecorators)
Creates a new JerseyDefaultConnectorConfigurator object.- Parameters:
clientConfigDecorators- a list of client config decorators
-
-
Method Detail
-
customizeBuilder
public void customizeBuilder(javax.ws.rs.client.ClientBuilder builder)
Description copied from interface:ClientConfiguratorCustomize the ClientBuilder instance.- Specified by:
customizeBuilderin interfaceClientConfigurator- Parameters:
builder- The client builder.
-
setSslContext
public void setSslContext(javax.ws.rs.client.ClientBuilder builder)
Sets the SSL context on the builder.Separate so subclasses can call if desired.
- Specified by:
setSslContextin interfaceSetsClientBuilderProperties- Parameters:
builder- The client builder to use.
-
setConnectorProvider
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.
- Specified by:
setConnectorProviderin interfaceSetsClientBuilderProperties- Parameters:
builder- The builder to set the provider on
-
customizeClient
public void customizeClient(javax.ws.rs.client.Client client)
Description copied from interface:ClientConfiguratorCustomize the Client generated by the builder.- Specified by:
customizeClientin interfaceClientConfigurator- Parameters:
client- The client.
-
-