public class ResteasyClientBuilder
extends javax.ws.rs.client.ClientBuilder
Modifier and Type | Class and Description |
---|---|
static class |
ResteasyClientBuilder.HostnameVerificationPolicy |
Constructor and Description |
---|
ResteasyClientBuilder() |
Modifier and Type | Method and Description |
---|---|
ResteasyClientBuilder |
asyncExecutor(ExecutorService asyncExecutor)
Deprecated.
use
executorService(ExecutorService) instead |
ResteasyClientBuilder |
asyncExecutor(ExecutorService asyncExecutor,
boolean cleanupExecutor)
Deprecated.
|
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 |
connectTimeout(long timeout,
TimeUnit unit) |
protected ResteasyClient |
createResteasyClient(ClientHttpEngine engine,
ExecutorService executor,
boolean cleanupExecutor,
ScheduledExecutorService scheduledExecutorService,
ClientConfiguration config) |
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)
Deprecated.
|
javax.ws.rs.client.ClientBuilder |
executorService(ExecutorService executorService) |
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
|
boolean |
isTrustSelfSignedCertificates() |
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 |
readTimeout(long timeout,
TimeUnit unit) |
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.
|
javax.ws.rs.client.ClientBuilder |
scheduledExecutorService(ScheduledExecutorService scheduledExecutorService) |
void |
setIsTrustSelfSignedCertificates(boolean b)
When the user is not using a TrustManager (see disableTrustManager) and
does not define an SSLContext object but they want all defined trustStores
to use the TrustSelfSignedCertificates trust strategy set this value to true.
|
ResteasyClientBuilder |
sniHostNames(String... sniHostNames)
Adds a TLS/SSL SNI Host Name for authentication.
|
ResteasyClientBuilder |
socketTimeout(long timeout,
TimeUnit unit)
Deprecated.
|
ResteasyClientBuilder |
sslContext(SSLContext sslContext) |
ResteasyClientBuilder |
trustStore(KeyStore truststore) |
ResteasyClientBuilder |
useAsyncHttpEngine() |
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 ScheduledExecutorService scheduledExecutorService
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
protected boolean trustSelfSignedCertificates
public static final String PROPERTY_PROXY_HOST
public static final String PROPERTY_PROXY_PORT
public static final String PROPERTY_PROXY_SCHEME
public ResteasyClientBuilder providerFactory(ResteasyProviderFactory providerFactory)
providerFactory
- provider factory@Deprecated public ResteasyClientBuilder asyncExecutor(ExecutorService asyncExecutor)
executorService(ExecutorService)
insteadasyncExecutor
- executor service@Deprecated public ResteasyClientBuilder asyncExecutor(ExecutorService asyncExecutor, boolean cleanupExecutor)
asyncExecutor
- executor servicecleanupExecutor
- true if the Client should close the executor when it is closedpublic ResteasyClientBuilder connectionTTL(long ttl, TimeUnit unit)
ttl
- time to liveunit
- the time unit of the ttl argumentpublic ResteasyClientBuilder readTimeout(long timeout, TimeUnit unit)
readTimeout
in class javax.ws.rs.client.ClientBuilder
@Deprecated public ResteasyClientBuilder socketTimeout(long timeout, TimeUnit unit)
timeout
- the maximum time to waitunit
- the time unit of the timeout argumentpublic ResteasyClientBuilder connectTimeout(long timeout, TimeUnit unit)
connectTimeout
in class javax.ws.rs.client.ClientBuilder
@Deprecated public ResteasyClientBuilder establishConnectionTimeout(long timeout, TimeUnit unit)
timeout
- the maximum time to waitunit
- the time unit of the timeout argumentpublic ResteasyClientBuilder maxPooledPerRoute(int maxPooledPerRoute)
maxPooledPerRoute
- max pool size per urlpublic ResteasyClientBuilder connectionCheckoutTimeout(long timeout, TimeUnit unit)
timeout
- the timeoutunit
- the units the timeout is inpublic ResteasyClientBuilder connectionPoolSize(int connectionPoolSize)
connectionPoolSize
- connection pool sizepublic ResteasyClientBuilder responseBufferSize(int size)
size
- response buffer sizepublic ResteasyClientBuilder disableTrustManager()
public void setIsTrustSelfSignedCertificates(boolean b)
b
- A value of true assigns trust strategy TrustSelfSignedCertificates
to the trustStores. A value of false assigns a null to the trust
strategy. The default value is true in order to maintain backward
compatibility.public boolean isTrustSelfSignedCertificates()
public ResteasyClientBuilder hostnameVerification(ResteasyClientBuilder.HostnameVerificationPolicy policy)
policy
- SSL policypublic ResteasyClientBuilder httpEngine(ClientHttpEngine httpEngine)
httpEngine
- http enginepublic ResteasyClientBuilder useAsyncHttpEngine()
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
- host namespublic ResteasyClientBuilder defaultProxy(String hostname)
hostname
- host namepublic ResteasyClientBuilder defaultProxy(String hostname, int port)
hostname
- host nameport
- portpublic ResteasyClientBuilder defaultProxy(String hostname, int port, String scheme)
hostname
- host nameport
- portscheme
- schemeprotected ResteasyProviderFactory getProviderFactory()
@Deprecated public ResteasyClient buildOld()
public ResteasyClient build()
build
in class javax.ws.rs.client.ClientBuilder
protected ResteasyClient createResteasyClient(ClientHttpEngine engine, ExecutorService executor, boolean cleanupExecutor, ScheduledExecutorService scheduledExecutorService, ClientConfiguration config)
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
public javax.ws.rs.client.ClientBuilder executorService(ExecutorService executorService)
executorService
in class javax.ws.rs.client.ClientBuilder
public javax.ws.rs.client.ClientBuilder scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
scheduledExecutorService
in class javax.ws.rs.client.ClientBuilder
Copyright © 2019 JBoss by Red Hat. All rights reserved.