javax.ws.rs.client.Client
instances.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | JAXRS_DEFAULT_CLIENT_BUILDER
Default client builder implementation class name. |
| public static final String | JAXRS_DEFAULT_CLIENT_BUILDER_PROPERTY
Name of the property identifying the |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract Client | Returns: a new client instance.Build a new client instance using all the configuration previously specified in this client builder. |
| public abstract ClientBuilder | Returns: an updated client builder instance.the maximum time to wait. timeout, TimeUnit the time unit of the timeout argument. unit)Set the connect timeout. |
| public abstract ClientBuilder | Returns: an updated client builder instance.executor service to be used for async invocations. executorService)Set the client-side |
| public abstract ClientBuilder | Returns: an updated client builder instance.hostname verifier. verifier)Set the hostname verifier to be used by the client to verify the endpoint's hostname against it's identification information. |
| public abstract ClientBuilder | |
| public ClientBuilder | |
| public static ClientBuilder | Returns: new client builder instance.Create a new |
| public static Client | |
| public static Client | Returns: new configured client instance.data used to provide initial configuration for the new
client instance. configuration)Create a new custom-configured |
| public abstract ClientBuilder | Returns: an updated client builder instance.the maximum time to wait. timeout, TimeUnit the time unit of the timeout argument. unit)Set the read timeout. |
| public abstract ClientBuilder | Returns: an updated client builder instance.executor service to be used for scheduled async invocations. scheduledExecutorService)Set the client-side |
| public abstract ClientBuilder | Returns: an updated client builder instance.secure socket protocol implementation which acts as a factory
for secure socket factories or sslContext)SSL engines. Must not be null.Set the SSL context that will be used when creating secured transport connections
to server endpoints from |
| public abstract ClientBuilder | Returns: an updated client builder instance.client-side trust store. Must not be trustStore)null.Set the client-side trust store. |
| public abstract ClientBuilder | Returns: the updated client builder instance.external configuration state to replace the configuration of this configurable
instance. config)Set the internal configuration state to an externally provided configuration state. |
| JAXRS_DEFAULT_CLIENT_BUILDER | back to summary |
|---|---|
| private static final String JAXRS_DEFAULT_CLIENT_BUILDER Default client builder implementation class name. | |
| JAXRS_DEFAULT_CLIENT_BUILDER_PROPERTY | back to summary |
|---|---|
| public static final String JAXRS_DEFAULT_CLIENT_BUILDER_PROPERTY Name of the property identifying the | |
| ClientBuilder | back to summary |
|---|---|
| protected ClientBuilder() Allows custom implementations to extend the | |
| build | back to summary |
|---|---|
| public abstract Client build() Build a new client instance using all the configuration previously specified in this client builder.
| |
| connectTimeout | back to summary |
|---|---|
| public abstract ClientBuilder connectTimeout(long timeout, TimeUnit unit) Set the connect timeout.
Value
| |
| executorService | back to summary |
|---|---|
| public abstract ClientBuilder executorService(final ExecutorService executorService) Set the client-side Provided executor service will be used for executing asynchronous tasks. When running in a Java EE container, implementations are required to use the container-managed executor service by default. In Java SE, the default is implementation-specific. In either case, calling this method will override the default.
| |
| hostnameVerifier | back to summary |
|---|---|
| public abstract ClientBuilder hostnameVerifier(final HostnameVerifier verifier) Set the hostname verifier to be used by the client to verify the endpoint's hostname against it's identification information.
| |
| keyStore | back to summary |
|---|---|
| public abstract ClientBuilder keyStore(final KeyStore keyStore, final char[] password) Set the client-side key store. Key store contains client's private keys, and the certificates with their corresponding public keys.
Setting a key store instance resets any Note that a custom key store is only required if you want to enable a custom setup of a 2-way SSL connections (client certificate authentication).
| |
| keyStore | back to summary |
|---|---|
| public ClientBuilder keyStore(final KeyStore keyStore, final String password) Set the client-side key store. Key store contains client's private keys, and the certificates with their corresponding public keys.
Setting a key store instance resets any
Note that for improved security of working with password data and avoid storing passwords in Java string
objects, the
| |
| newBuilder | back to summary |
|---|---|
| public static ClientBuilder newBuilder() Create a new
| |
| newClient | back to summary |
|---|---|
| public static Client newClient() Create a new
| |
| newClient | back to summary |
|---|---|
| public static Client newClient(final Configuration configuration) Create a new custom-configured
| |
| readTimeout | back to summary |
|---|---|
| public abstract ClientBuilder readTimeout(long timeout, TimeUnit unit) Set the read timeout.
The value is the timeout to read a response. If the server doesn't respond within the defined timeframe,
Value
| |
| scheduledExecutorService | back to summary |
|---|---|
| public abstract ClientBuilder scheduledExecutorService(final ScheduledExecutorService scheduledExecutorService) Set the client-side Provided executor service will be used for executing scheduled asynchronous tasks. When running in a Java EE container, implementations are required to use the container-managed scheduled executor service by default. In Java SE the default is implementation-specific. In either case, calling this method will override the default.
| |
| sslContext | back to summary |
|---|---|
| public abstract ClientBuilder sslContext(final SSLContext sslContext) Set the SSL context that will be used when creating secured transport connections
to server endpoints from
Setting a SSL context instance resets any
| |
| trustStore | back to summary |
|---|---|
| public abstract ClientBuilder trustStore(final KeyStore trustStore) Set the client-side trust store. Trust store is expected to contain certificates from other parties the client is you expect to communicate with, or from Certificate Authorities that are trusted to identify other parties.
Setting a trust store instance resets any In case a custom trust store or custom SSL context is not specified, the trust management will be configured to use the default Java runtime settings.
| |
| withConfig | back to summary |
|---|---|
| public abstract ClientBuilder withConfig(Configuration config) Set the internal configuration state to an externally provided configuration state.
| |