public class ResteasyClientBuilder
extends javax.ws.rs.client.ClientBuilder
Modifier and Type | Class and Description |
---|---|
static class |
ResteasyClientBuilder.HostnameVerificationPolicy |
Modifier and Type | Field and Description |
---|---|
protected ExecutorService |
asyncExecutor |
protected boolean |
cleanupExecutor |
protected KeyStore |
clientKeyStore |
protected String |
clientPrivateKeyPassword |
protected int |
connectionCheckoutTimeoutMs |
protected int |
connectionPoolSize |
protected long |
connectionTTL |
protected TimeUnit |
connectionTTLUnit |
protected org.apache.http.HttpHost |
defaultProxy |
protected boolean |
disableTrustManager |
protected long |
establishConnectionTimeout |
protected TimeUnit |
establishConnectionTimeoutUnits |
protected ClientHttpEngine |
httpEngine |
protected int |
maxPooledPerRoute |
protected ResteasyClientBuilder.HostnameVerificationPolicy |
policy |
protected Map<String,Object> |
properties |
protected ResteasyProviderFactory |
providerFactory |
protected int |
responseBufferSize |
protected List<String> |
sniHostNames |
protected long |
socketTimeout |
protected TimeUnit |
socketTimeoutUnits |
protected SSLContext |
sslContext |
protected KeyStore |
truststore |
protected HostnameVerifier |
verifier |
Constructor and Description |
---|
ResteasyClientBuilder() |
Modifier and Type | Method and Description |
---|---|
ResteasyClientBuilder |
asyncExecutor(ExecutorService asyncExecutor)
Executor to use to run AsyncInvoker invocations
|
ResteasyClientBuilder |
asyncExecutor(ExecutorService asyncExecutor,
boolean cleanupExecutor)
Executor to use to run AsyncInvoker invocations
|
ResteasyClient |
build() |
ResteasyClient |
buildOld()
Deprecated.
|
ResteasyClientBuilder |
connectionCheckoutTimeout(long timeout,
TimeUnit unit)
If connection pooling is enabled, how long will we wait to get a connection?
|
ResteasyClientBuilder |
connectionPoolSize(int connectionPoolSize)
Number of connections allowed to pool
|
ResteasyClientBuilder |
connectionTTL(long ttl,
TimeUnit unit)
If there is a connection pool, set the time to live in the pool.
|
ResteasyClientBuilder |
defaultProxy(String hostname)
Specify a default proxy.
|
ResteasyClientBuilder |
defaultProxy(String hostname,
int port)
Specify a default proxy host and port.
|
ResteasyClientBuilder |
defaultProxy(String hostname,
int port,
String scheme)
Specify default proxy.
|
ResteasyClientBuilder |
disableTrustManager()
Disable trust management and hostname verification.
|
ResteasyClientBuilder |
establishConnectionTimeout(long timeout,
TimeUnit unit)
When trying to make an initial socket connection, what is the timeout?
|
javax.ws.rs.core.Configuration |
getConfiguration() |
protected ResteasyProviderFactory |
getProviderFactory() |
ResteasyClientBuilder |
hostnameVerification(ResteasyClientBuilder.HostnameVerificationPolicy policy)
SSL policy used to verify hostnames
|
ResteasyClientBuilder |
hostnameVerifier(HostnameVerifier verifier) |
ResteasyClientBuilder |
httpEngine(ClientHttpEngine httpEngine)
Negates all ssl and connection specific configuration
|
protected ClientHttpEngine |
initDefaultEngine() |
ResteasyClientBuilder |
keyStore(KeyStore keyStore,
char[] password) |
ResteasyClientBuilder |
keyStore(KeyStore keyStore,
String password) |
ResteasyClientBuilder |
maxPooledPerRoute(int maxPooledPerRoute)
If connection pooling enabled, how many connections to pool per url?
|
protected void |
prepareSocketForSni(SSLSocket socket) |
ResteasyClientBuilder |
property(String name,
Object value) |
ResteasyClientBuilder |
providerFactory(ResteasyProviderFactory providerFactory)
Changing the providerFactory will wipe clean any registered components or properties.
|
ResteasyClientBuilder |
register(Class<?> componentClass) |
ResteasyClientBuilder |
register(Class<?> componentClass,
Class<?>... contracts) |
ResteasyClientBuilder |
register(Class<?> componentClass,
int priority) |
ResteasyClientBuilder |
register(Class<?> componentClass,
Map<Class<?>,Integer> contracts) |
ResteasyClientBuilder |
register(Object component) |
ResteasyClientBuilder |
register(Object component,
Class<?>... contracts) |
ResteasyClientBuilder |
register(Object component,
int priority) |
ResteasyClientBuilder |
register(Object component,
Map<Class<?>,Integer> contracts) |
ResteasyClientBuilder |
responseBufferSize(int size)
Response stream is wrapped in a BufferedInputStream.
|
ResteasyClientBuilder |
sniHostNames(String... sniHostNames)
Adds a TLS/SSL SNI Host Name for authentication.
|
ResteasyClientBuilder |
socketTimeout(long timeout,
TimeUnit unit)
The timeout for waiting for data.
|
ResteasyClientBuilder |
sslContext(SSLContext sslContext) |
ResteasyClientBuilder |
trustStore(KeyStore truststore) |
ResteasyClientBuilder |
withConfig(javax.ws.rs.core.Configuration config) |
protected KeyStore truststore
protected KeyStore clientKeyStore
protected String clientPrivateKeyPassword
protected boolean disableTrustManager
protected ResteasyClientBuilder.HostnameVerificationPolicy policy
protected ResteasyProviderFactory providerFactory
protected ExecutorService asyncExecutor
protected boolean cleanupExecutor
protected SSLContext sslContext
protected ClientHttpEngine httpEngine
protected int connectionPoolSize
protected int maxPooledPerRoute
protected long connectionTTL
protected TimeUnit connectionTTLUnit
protected long socketTimeout
protected TimeUnit socketTimeoutUnits
protected long establishConnectionTimeout
protected TimeUnit establishConnectionTimeoutUnits
protected int connectionCheckoutTimeoutMs
protected HostnameVerifier verifier
protected org.apache.http.HttpHost defaultProxy
protected int responseBufferSize
public ResteasyClientBuilder providerFactory(ResteasyProviderFactory providerFactory)
providerFactory
- public ResteasyClientBuilder asyncExecutor(ExecutorService asyncExecutor)
asyncExecutor
- public ResteasyClientBuilder asyncExecutor(ExecutorService asyncExecutor, boolean cleanupExecutor)
asyncExecutor
- cleanupExecutor
- true if the Client should close the executor when it is closedpublic ResteasyClientBuilder connectionTTL(long ttl, TimeUnit unit)
ttl
- unit
- public ResteasyClientBuilder socketTimeout(long timeout, TimeUnit unit)
timeout
- unit
- public ResteasyClientBuilder establishConnectionTimeout(long timeout, TimeUnit unit)
timeout
- unit
- public ResteasyClientBuilder maxPooledPerRoute(int maxPooledPerRoute)
maxPooledPerRoute
- public ResteasyClientBuilder connectionCheckoutTimeout(long timeout, TimeUnit unit)
timeout
- the timeoutunit
- the units the timeout is inpublic ResteasyClientBuilder connectionPoolSize(int connectionPoolSize)
connectionPoolSize
- public ResteasyClientBuilder responseBufferSize(int size)
size
- public ResteasyClientBuilder disableTrustManager()
public ResteasyClientBuilder hostnameVerification(ResteasyClientBuilder.HostnameVerificationPolicy policy)
policy
- public ResteasyClientBuilder httpEngine(ClientHttpEngine httpEngine)
httpEngine
- public ResteasyClientBuilder sslContext(SSLContext sslContext)
sslContext
in class javax.ws.rs.client.ClientBuilder
public ResteasyClientBuilder trustStore(KeyStore truststore)
trustStore
in class javax.ws.rs.client.ClientBuilder
public ResteasyClientBuilder keyStore(KeyStore keyStore, String password)
keyStore
in class javax.ws.rs.client.ClientBuilder
public ResteasyClientBuilder keyStore(KeyStore keyStore, char[] password)
keyStore
in class javax.ws.rs.client.ClientBuilder
public ResteasyClientBuilder property(String name, Object value)
public ResteasyClientBuilder sniHostNames(String... sniHostNames)
sniHostNames
- public ResteasyClientBuilder defaultProxy(String hostname)
hostname
- public ResteasyClientBuilder defaultProxy(String hostname, int port)
hostname
- port
- public ResteasyClientBuilder defaultProxy(String hostname, int port, String scheme)
hostname
- port
- scheme
- protected ResteasyProviderFactory getProviderFactory()
@Deprecated public ResteasyClient buildOld()
public ResteasyClient build()
build
in class javax.ws.rs.client.ClientBuilder
protected ClientHttpEngine initDefaultEngine()
protected void prepareSocketForSni(SSLSocket socket)
public ResteasyClientBuilder hostnameVerifier(HostnameVerifier verifier)
hostnameVerifier
in class javax.ws.rs.client.ClientBuilder
public javax.ws.rs.core.Configuration getConfiguration()
public ResteasyClientBuilder register(Class<?> componentClass)
public ResteasyClientBuilder register(Class<?> componentClass, int priority)
public ResteasyClientBuilder register(Class<?> componentClass, Class<?>... contracts)
public ResteasyClientBuilder register(Class<?> componentClass, Map<Class<?>,Integer> contracts)
public ResteasyClientBuilder register(Object component)
public ResteasyClientBuilder register(Object component, int priority)
public ResteasyClientBuilder register(Object component, Class<?>... contracts)
public ResteasyClientBuilder register(Object component, Map<Class<?>,Integer> contracts)
public ResteasyClientBuilder withConfig(javax.ws.rs.core.Configuration config)
withConfig
in class javax.ws.rs.client.ClientBuilder
Copyright © 2017 JBoss by Red Hat. All rights reserved.