public class RestClientBuilder extends BeanContextBuilder
RestClient
class.
Instances of this class are created by the following methods:
RestClient.create()
- Create from scratch.
RestClient.create(Serializer,Parser)
- Create from scratch using specified serializer/parser.
RestClient.create(Class,Class)
- Create from scratch using specified serializer/parser classes.
RestClient.builder()
- Copy settings from an existing client.
psb
Modifier and Type | Method and Description |
---|---|
RestClientBuilder |
abridged()
Configuration property: Abridged output.
|
RestClientBuilder |
abridged(boolean value)
Configuration property: Abridged output.
|
RestClientBuilder |
accept(Object value)
Sets the value for the
Accept request header. |
RestClientBuilder |
acceptCharset(Object value)
Sets the value for the
Accept-Charset request header. |
RestClientBuilder |
acceptEncoding(Object value)
Sets the value for the
Accept-Encoding request header. |
RestClientBuilder |
acceptLanguage(Object value)
Sets the value for the
Accept-Language request header. |
RestClientBuilder |
add(Map<String,Object> properties)
Adds multiple configuration properties on this object.
|
RestClientBuilder |
addBeanTypeProperties(boolean value)
Configuration property: Add
|
RestClientBuilder |
addInterceptorFirst(org.apache.http.HttpRequestInterceptor itcp) |
RestClientBuilder |
addInterceptorFirst(org.apache.http.HttpResponseInterceptor itcp) |
RestClientBuilder |
addInterceptorLast(org.apache.http.HttpRequestInterceptor itcp) |
RestClientBuilder |
addInterceptorLast(org.apache.http.HttpResponseInterceptor itcp) |
RestClientBuilder |
addTo(String name,
Object value)
Adds a value to a SET or LIST property.
|
RestClientBuilder |
addTo(String name,
String key,
Object value)
Adds or overwrites a value to a SET, LIST, or MAP property.
|
RestClientBuilder |
apply(PropertyStore copyFrom)
Copies the settings from the specified property store into this builder.
|
RestClientBuilder |
authorization(Object value)
Sets the value for the
Authorization request header. |
RestClientBuilder |
autoCloseStreams()
Configuration property: Auto-close streams.
|
RestClientBuilder |
autoCloseStreams(boolean value)
Configuration property: Auto-close streams.
|
RestClientBuilder |
basicAuth(String host,
int port,
String user,
String pw)
Set up this client to use BASIC auth.
|
RestClientBuilder |
beanClassVisibility(Visibility value)
Configuration property: Minimum bean class visibility.
|
RestClientBuilder |
beanConstructorVisibility(Visibility value)
Configuration property: Minimum bean constructor visibility.
|
RestClientBuilder |
beanDictionary(boolean append,
Object... values)
Configuration property: Bean dictionary.
|
RestClientBuilder |
beanDictionary(Class<?>... values)
Configuration property: Bean dictionary.
|
RestClientBuilder |
beanDictionary(Object... values)
Configuration property: Bean dictionary.
|
RestClientBuilder |
beanDictionaryRemove(Object... values)
Configuration property: Bean dictionary.
|
RestClientBuilder |
beanFieldVisibility(Visibility value)
Configuration property: Minimum bean field visibility.
|
RestClientBuilder |
beanFilters(boolean append,
Object... values)
Configuration property: Bean filters.
|
RestClientBuilder |
beanFilters(Class<?>... values)
Configuration property: Bean filters.
|
RestClientBuilder |
beanFilters(Object... values)
Configuration property: Bean filters.
|
RestClientBuilder |
beanFiltersRemove(Object... values)
Configuration property: Bean filters.
|
RestClientBuilder |
beanMapPutReturnsOldValue()
Configuration property: BeanMap.put() returns old property value.
|
RestClientBuilder |
beanMapPutReturnsOldValue(boolean value)
Configuration property: BeanMap.put() returns old property value.
|
RestClientBuilder |
beanMethodVisibility(Visibility value)
Configuration property: Minimum bean method visibility.
|
RestClientBuilder |
beansRequireDefaultConstructor()
Configuration property: Beans require no-arg constructors.
|
RestClientBuilder |
beansRequireDefaultConstructor(boolean value)
Configuration property: Beans require no-arg constructors.
|
RestClientBuilder |
beansRequireSerializable()
Configuration property: Beans require Serializable interface.
|
RestClientBuilder |
beansRequireSerializable(boolean value)
Configuration property: Beans require Serializable interface.
|
RestClientBuilder |
beansRequireSettersForGetters()
Configuration property: Beans require setters for getters.
|
RestClientBuilder |
beansRequireSettersForGetters(boolean value)
Configuration property: Beans require setters for getters.
|
RestClientBuilder |
beansRequireSomeProperties(boolean value)
Configuration property: Beans require at least one property.
|
RestClientBuilder |
beanTypePropertyName(String value)
Configuration property: Bean type property name.
|
RestClient |
build()
Build the object.
|
RestClientBuilder |
cacheControl(Object value)
Sets the value for the
Cache-Control request header. |
RestClientBuilder |
clientVersion(String version)
Sets the client version by setting the value for the
|
RestClientBuilder |
connection(Object value)
Sets the value for the
Connection request header. |
RestClientBuilder |
contentLength(Object value)
Sets the value for the
Content-Length request header. |
RestClientBuilder |
contentType(Object value)
Sets the value for the
Content-Type request header. |
protected org.apache.http.conn.HttpClientConnectionManager |
createConnectionManager()
Creates the
HttpClientConnectionManager returned by createConnectionManager() . |
protected org.apache.http.impl.client.CloseableHttpClient |
createHttpClient()
Creates an instance of an
HttpClient to be used to handle all HTTP communications with the target server. |
protected org.apache.http.impl.client.HttpClientBuilder |
createHttpClientBuilder()
Creates an instance of an
HttpClientBuilder to be used to create the HttpClient . |
RestClientBuilder |
date(Object value)
Sets the value for the
Date request header. |
RestClientBuilder |
debug()
Configuration property: Debug mode.
|
RestClientBuilder |
detectRecursions()
Configuration property: Automatically detect POJO recursions.
|
RestClientBuilder |
detectRecursions(boolean value)
Configuration property: Automatically detect POJO recursions.
|
RestClientBuilder |
disableAuthCaching() |
RestClientBuilder |
disableAutomaticRetries() |
RestClientBuilder |
disableConnectionState() |
RestClientBuilder |
disableContentCompression() |
RestClientBuilder |
disableCookieManagement() |
RestClientBuilder |
disableRedirectHandling() |
RestClientBuilder |
enableLaxSSL()
Enable LAX SSL support.
|
RestClientBuilder |
enableSSL(SSLOpts opts)
Enable SSL support on this client.
|
RestClientBuilder |
evictExpiredConnections() |
RestClientBuilder |
evictIdleConnections(long maxIdleTime,
TimeUnit maxIdleTimeUnit) |
RestClientBuilder |
executorService(ExecutorService executorService,
boolean shutdownOnClose)
Configuration property: Executor service.
|
RestClientBuilder |
expect(Object value)
Sets the value for the
Expect request header. |
RestClientBuilder |
fileCharset(String value)
Configuration property: File charset.
|
RestClientBuilder |
forwarded(Object value)
Sets the value for the
Forwarded request header. |
RestClientBuilder |
from(Object value)
Sets the value for the
From request header. |
RestClientBuilder |
header(String key,
Object value)
Configuration property: Request headers.
|
RestClientBuilder |
host(Object value)
Sets the value for the
Host request header. |
RestClientBuilder |
httpClient(org.apache.http.impl.client.CloseableHttpClient httpClient,
boolean keepHttpClientOpen)
Sets the internal
HttpClient to use for handling HTTP communications. |
RestClientBuilder |
ifMatch(Object value)
Sets the value for the
If-Match request header. |
RestClientBuilder |
ifModifiedSince(Object value)
Sets the value for the
If-Modified-Since request header. |
RestClientBuilder |
ifNoneMatch(Object value)
Sets the value for the
If-None-Match request header. |
RestClientBuilder |
ifRange(Object value)
Sets the value for the
If-Range request header. |
RestClientBuilder |
ifUnmodifiedSince(Object value)
Sets the value for the
If-Unmodified-Since request header. |
RestClientBuilder |
ignoreInvocationExceptionsOnGetters()
Configuration property: Ignore invocation errors on getters.
|
RestClientBuilder |
ignoreInvocationExceptionsOnGetters(boolean value)
Configuration property: Ignore invocation errors on getters.
|
RestClientBuilder |
ignoreInvocationExceptionsOnSetters()
Configuration property: Ignore invocation errors on setters.
|
RestClientBuilder |
ignoreInvocationExceptionsOnSetters(boolean value)
Configuration property: Ignore invocation errors on setters.
|
RestClientBuilder |
ignorePropertiesWithoutSetters(boolean value)
Configuration property: Ignore properties without setters.
|
RestClientBuilder |
ignoreRecursions()
Configuration property: Ignore recursion errors.
|
RestClientBuilder |
ignoreRecursions(boolean value)
Configuration property: Ignore recursion errors.
|
RestClientBuilder |
ignoreUnknownBeanProperties()
Configuration property: Ignore unknown properties.
|
RestClientBuilder |
ignoreUnknownBeanProperties(boolean value)
Configuration property: Ignore unknown properties.
|
RestClientBuilder |
ignoreUnknownNullBeanProperties(boolean value)
Configuration property: Ignore unknown properties with null values.
|
<T> RestClientBuilder |
implClass(Class<T> interfaceClass,
Class<? extends T> implClass)
Configuration property: Implementation classes.
|
RestClientBuilder |
implClasses(Map<String,Class<?>> values)
Configuration property: Implementation classes.
|
RestClientBuilder |
initialDepth(int value)
Configuration property: Initial depth.
|
RestClientBuilder |
inputStreamCharset(String value)
Configuration property: Input stream charset.
|
RestClientBuilder |
interceptors(RestCallInterceptor... value)
Configuration property: Call interceptors.
|
RestClientBuilder |
keepHttpClientOpen(boolean value)
Configuration property: Keep HttpClient open.
|
RestClientBuilder |
listenerP(Class<? extends ParserListener> value)
Configuration property: Parser listener.
|
RestClientBuilder |
listenerS(Class<? extends SerializerListener> value)
Configuration property: Serializer listener.
|
RestClientBuilder |
locale(Locale value)
Configuration property: Locale.
|
RestClientBuilder |
logTo(Level level,
Logger log)
Adds a
RestCallLogger to the list of interceptors on this class. |
RestClientBuilder |
maxDepth(int value)
Configuration property: Max serialization depth.
|
RestClientBuilder |
maxForwards(Object value)
Sets the value for the
Max-Forwards request header. |
RestClientBuilder |
maxIndent(boolean value)
Configuration property: Maximum indentation.
|
RestClientBuilder |
mediaType(MediaType value)
Configuration property: Media type.
|
RestClientBuilder |
notBeanClasses(boolean append,
Object... values)
Configuration property: Bean class exclusions.
|
RestClientBuilder |
notBeanClasses(Class<?>... values)
Configuration property: Bean class exclusions.
|
RestClientBuilder |
notBeanClasses(Object... values)
Configuration property: Bean class exclusions.
|
RestClientBuilder |
notBeanClassesRemove(Object... values)
Configuration property: Bean class exclusions.
|
RestClientBuilder |
notBeanPackages(boolean append,
Object... values)
Configuration property: Bean package exclusions.
|
RestClientBuilder |
notBeanPackages(Object... values)
Configuration property: Bean package exclusions.
|
RestClientBuilder |
notBeanPackages(String... values)
Configuration property: Bean package exclusions.
|
RestClientBuilder |
notBeanPackagesRemove(Object... values)
Configuration property: Bean package exclusions.
|
RestClientBuilder |
noTrace()
When called,
No-Trace: true is added to requests. |
RestClientBuilder |
origin(Object value)
Sets the value for the
Origin request header. |
RestClientBuilder |
paramFormat(String value)
Configuration property: Parameter format.
|
RestClientBuilder |
paramFormatPlain()
Configuration property: Parameter format.
|
RestClientBuilder |
parser(Class<? extends Parser> value)
Configuration property: Parser.
|
RestClientBuilder |
parser(Parser value)
Configuration property: Parser.
|
RestClientBuilder |
partSerializer(Class<? extends HttpPartSerializer> value)
Configuration property: Part serializer.
|
RestClientBuilder |
partSerializer(HttpPartSerializer value)
Configuration property: Part serializer.
|
RestClientBuilder |
pojoSwaps(boolean append,
Object... values)
Configuration property: POJO swaps.
|
RestClientBuilder |
pojoSwaps(Class<?>... values)
Configuration property: POJO swaps.
|
RestClientBuilder |
pojoSwaps(Object... values)
Configuration property: POJO swaps.
|
RestClientBuilder |
pojoSwapsRemove(Object... values)
Configuration property: POJO swaps.
|
RestClientBuilder |
pooled()
When called, the
createConnectionManager() method will return a PoolingHttpClientConnectionManager
instead of a BasicHttpClientConnectionManager . |
RestClientBuilder |
pragma(Object value)
Sets the value for the
Pragma request header. |
RestClientBuilder |
proxyAuthorization(Object value)
Sets the value for the
Proxy-Authorization request header. |
RestClientBuilder |
query(String key,
Object value)
Configuration property: Request query parameters.
|
RestClientBuilder |
quoteChar(char value)
Configuration property: Quote character.
|
RestClientBuilder |
range(Object value)
Sets the value for the
Range request header. |
RestClientBuilder |
referer(Object value)
Sets the value for the
Referer request header. |
RestClientBuilder |
removeFrom(String name,
Object value)
Removes a value from a SET, LIST, or MAP property.
|
RestClientBuilder |
retryable(int retries,
int interval,
RetryOn retryOn)
Make HTTP calls retryable if an error response (>=400) is received.
|
RestClientBuilder |
rootUrl(Object value)
Configuration property: Root URI.
|
RestClientBuilder |
serializer(Class<? extends Serializer> value)
Configuration property: Serializer.
|
RestClientBuilder |
serializer(Serializer value)
Configuration property: Serializer.
|
RestClientBuilder |
set(boolean append,
String name,
Object value)
Sets or adds to a SET or LIST property.
|
RestClientBuilder |
set(Map<String,Object> properties)
Sets multiple configuration properties on this object.
|
RestClientBuilder |
set(String name,
Object value)
Sets a configuration property on this object.
|
RestClientBuilder |
setBackoffManager(org.apache.http.client.BackoffManager backoffManager) |
RestClientBuilder |
setConnectionBackoffStrategy(org.apache.http.client.ConnectionBackoffStrategy connectionBackoffStrategy) |
RestClientBuilder |
setConnectionManager(org.apache.http.conn.HttpClientConnectionManager connManager) |
RestClientBuilder |
setConnectionManagerShared(boolean shared) |
RestClientBuilder |
setConnectionReuseStrategy(org.apache.http.ConnectionReuseStrategy reuseStrategy) |
RestClientBuilder |
setConnectionTimeToLive(long connTimeToLive,
TimeUnit connTimeToLiveTimeUnit) |
RestClientBuilder |
setContentDecoderRegistry(Map<String,org.apache.http.client.entity.InputStreamFactory> contentDecoderMap) |
RestClientBuilder |
setDefaultAuthSchemeRegistry(org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> authSchemeRegistry) |
RestClientBuilder |
setDefaultConnectionConfig(org.apache.http.config.ConnectionConfig config) |
RestClientBuilder |
setDefaultCookieSpecRegistry(org.apache.http.config.Lookup<org.apache.http.cookie.CookieSpecProvider> cookieSpecRegistry) |
RestClientBuilder |
setDefaultCookieStore(org.apache.http.client.CookieStore cookieStore) |
RestClientBuilder |
setDefaultCredentialsProvider(org.apache.http.client.CredentialsProvider credentialsProvider) |
RestClientBuilder |
setDefaultHeaders(Collection<? extends org.apache.http.Header> defaultHeaders) |
RestClientBuilder |
setDefaultRequestConfig(org.apache.http.client.config.RequestConfig config) |
RestClientBuilder |
setDefaultSocketConfig(org.apache.http.config.SocketConfig config) |
RestClientBuilder |
setHttpProcessor(org.apache.http.protocol.HttpProcessor httpprocessor) |
RestClientBuilder |
setKeepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy) |
RestClientBuilder |
setMaxConnPerRoute(int maxConnPerRoute) |
RestClientBuilder |
setMaxConnTotal(int maxConnTotal) |
RestClientBuilder |
setProxy(org.apache.http.HttpHost proxy) |
RestClientBuilder |
setProxyAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy proxyAuthStrategy) |
RestClientBuilder |
setPublicSuffixMatcher(org.apache.http.conn.util.PublicSuffixMatcher publicSuffixMatcher) |
RestClientBuilder |
setRedirectStrategy(org.apache.http.client.RedirectStrategy redirectStrategy) |
RestClientBuilder |
setRequestExecutor(org.apache.http.protocol.HttpRequestExecutor requestExec) |
RestClientBuilder |
setRetryHandler(org.apache.http.client.HttpRequestRetryHandler retryHandler) |
RestClientBuilder |
setRoutePlanner(org.apache.http.conn.routing.HttpRoutePlanner routePlanner) |
RestClientBuilder |
setSchemePortResolver(org.apache.http.conn.SchemePortResolver schemePortResolver) |
RestClientBuilder |
setServiceUnavailableRetryStrategy(org.apache.http.client.ServiceUnavailableRetryStrategy serviceUnavailStrategy) |
RestClientBuilder |
setSSLContext(SSLContext sslContext) |
RestClientBuilder |
setSSLHostnameVerifier(HostnameVerifier hostnameVerifier) |
RestClientBuilder |
setSSLSocketFactory(org.apache.http.conn.socket.LayeredConnectionSocketFactory sslSocketFactory) |
RestClientBuilder |
setTargetAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy targetAuthStrategy) |
RestClientBuilder |
setUserAgent(String userAgent) |
RestClientBuilder |
setUserTokenHandler(org.apache.http.client.UserTokenHandler userTokenHandler) |
RestClientBuilder |
sortCollections()
Configuration property: Sort arrays and collections alphabetically.
|
RestClientBuilder |
sortCollections(boolean value)
Configuration property: Sort arrays and collections alphabetically.
|
RestClientBuilder |
sortMaps()
Configuration property: Sort maps alphabetically.
|
RestClientBuilder |
sortMaps(boolean value)
Sets the
Serializer.SERIALIZER_sortMaps property on all serializers in this group. |
RestClientBuilder |
sortProperties()
Configuration property: Sort bean properties.
|
RestClientBuilder |
sortProperties(boolean value)
Configuration property: Sort bean properties.
|
RestClientBuilder |
sq()
Configuration property: Quote character.
|
RestClientBuilder |
strict()
Configuration property: Strict mode.
|
RestClientBuilder |
strict(boolean value)
Configuration property: Strict mode.
|
RestClientBuilder |
te(Object value)
Sets the value for the
TE request header. |
RestClientBuilder |
timeZone(TimeZone value)
Configuration property: TimeZone.
|
RestClientBuilder |
trimEmptyCollections()
Configuration property: Trim empty lists and arrays.
|
RestClientBuilder |
trimEmptyCollections(boolean value)
Configuration property: Trim empty lists and arrays.
|
RestClientBuilder |
trimEmptyMaps()
Configuration property: Trim empty maps.
|
RestClientBuilder |
trimEmptyMaps(boolean value)
Configuration property: Trim empty maps.
|
RestClientBuilder |
trimNullProperties(boolean value)
Configuration property: Trim null bean property values.
|
RestClientBuilder |
trimStringsP()
Configuration property: Trim parsed strings.
|
RestClientBuilder |
trimStringsP(boolean value)
Configuration property: Trim parsed strings.
|
RestClientBuilder |
trimStringsS()
Configuration property: Trim strings.
|
RestClientBuilder |
trimStringsS(boolean value)
Configuration property: Trim strings.
|
RestClientBuilder |
unbuffered()
Configuration property: Unbuffered.
|
RestClientBuilder |
unbuffered(boolean value)
Configuration property: Unbuffered.
|
RestClientBuilder |
upgrade(Object value)
Sets the value for the
Upgrade request header. |
RestClientBuilder |
uriContext(UriContext value)
Configuration property: URI context bean.
|
RestClientBuilder |
uriRelativity(UriRelativity value)
Configuration property: URI relativity.
|
RestClientBuilder |
uriResolution(UriResolution value)
Configuration property: URI resolution.
|
RestClientBuilder |
useInterfaceProxies(boolean value)
Configuration property: Use interface proxies.
|
RestClientBuilder |
useJavaBeanIntrospector()
Configuration property: Use Java Introspector.
|
RestClientBuilder |
useJavaBeanIntrospector(boolean value)
Configuration property: Use Java Introspector.
|
RestClientBuilder |
userAgent(Object value)
Sets the value for the
User-Agent request header. |
RestClientBuilder |
useSystemProperties() |
RestClientBuilder |
useWhitespace()
Configuration property: Use whitespace.
|
RestClientBuilder |
useWhitespace(boolean value)
Configuration property: Use whitespace.
|
RestClientBuilder |
via(Object value)
Sets the value for the
Via request header. |
RestClientBuilder |
warning(Object value)
Sets the value for the
Warning request header. |
RestClientBuilder |
ws()
Configuration property: Use whitespace.
|
debug, excludeProperties, excludeProperties, excludeProperties, includeProperties, includeProperties, includeProperties, propertyNamer
build, getPropertyStore, getPropertyStoreBuilder
public RestClient build()
ContextBuilder
build
in class BeanContextBuilder
protected org.apache.http.impl.client.CloseableHttpClient createHttpClient() throws Exception
HttpClient
to be used to handle all HTTP communications with the target server.
This HTTP client is used when the HTTP client is not specified through one of the constructors or the
httpClient(CloseableHttpClient, boolean)
method.
Subclasses can override this method to provide specially-configured HTTP clients to handle stuff such as SSL/TLS certificate handling, authentication, etc.
The default implementation returns an instance of HttpClient
using the client builder returned by
createHttpClientBuilder()
.
Exception
protected org.apache.http.impl.client.HttpClientBuilder createHttpClientBuilder()
HttpClientBuilder
to be used to create the HttpClient
.
Subclasses can override this method to provide their own client builder.
The predefined method returns an HttpClientBuilder
with the following settings:
createConnectionManager()
.
protected org.apache.http.conn.HttpClientConnectionManager createConnectionManager()
HttpClientConnectionManager
returned by createConnectionManager()
.
Subclasses can override this method to provide their own connection manager.
The default implementation returns an instance of a PoolingHttpClientConnectionManager
.
public RestClientBuilder enableSSL(SSLOpts opts) throws KeyStoreException, NoSuchAlgorithmException
opts
- The SSL configuration options.
See SSLOpts
for details.
This method is a no-op if sslConfig
is KeyStoreException
NoSuchAlgorithmException
public RestClientBuilder enableLaxSSL() throws KeyStoreException, NoSuchAlgorithmException
Certificate chain validation and hostname verification is disabled.
KeyStoreException
NoSuchAlgorithmException
public RestClientBuilder clientVersion(String version)
version
- The version string (e.g. public RestClientBuilder logTo(Level level, Logger log)
RestCallLogger
to the list of interceptors on this class.level
- The log level to log messages at.log
- The logger to log messages to.public RestClientBuilder pooled()
createConnectionManager()
method will return a PoolingHttpClientConnectionManager
instead of a BasicHttpClientConnectionManager
.public RestClientBuilder basicAuth(String host, int port, String user, String pw)
host
- The auth scope hostname.port
- The auth scope port.user
- The username.pw
- The password.public RestClientBuilder httpClient(org.apache.http.impl.client.CloseableHttpClient httpClient, boolean keepHttpClientOpen)
HttpClient
to use for handling HTTP communications.httpClient
- The HTTP client.keepHttpClientOpen
- Don't close this client when the RestClient.close()
method is called.public RestClientBuilder accept(Object value)
Accept
request header.
This overrides the media type specified on the parser, but is overridden by calling
header(
value
- The new header value.public RestClientBuilder acceptCharset(Object value)
Accept-Charset
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder acceptEncoding(Object value)
Accept-Encoding
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder acceptLanguage(Object value)
Accept-Language
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder authorization(Object value)
Authorization
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder cacheControl(Object value)
Cache-Control
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder connection(Object value)
Connection
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder contentLength(Object value)
Content-Length
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder contentType(Object value)
Content-Type
request header.
This overrides the media type specified on the serializer, but is overridden by calling
header(
value
- The new header value.public RestClientBuilder date(Object value)
Date
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder expect(Object value)
Expect
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder forwarded(Object value)
Forwarded
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder from(Object value)
From
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder host(Object value)
Host
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder ifMatch(Object value)
If-Match
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder ifModifiedSince(Object value)
If-Modified-Since
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder ifNoneMatch(Object value)
If-None-Match
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder ifRange(Object value)
If-Range
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder ifUnmodifiedSince(Object value)
If-Unmodified-Since
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder maxForwards(Object value)
Max-Forwards
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder noTrace()
No-Trace: true
is added to requests.
This gives the opportunity for the servlet to not log errors on invalid requests. This is useful for testing purposes when you don't want your log file to show lots of errors that are simply the results of testing.
public RestClientBuilder origin(Object value)
Origin
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder pragma(Object value)
Pragma
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder proxyAuthorization(Object value)
Proxy-Authorization
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder range(Object value)
Range
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder referer(Object value)
Referer
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder te(Object value)
TE
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder userAgent(Object value)
User-Agent
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder upgrade(Object value)
Upgrade
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder via(Object value)
Via
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder warning(Object value)
Warning
request header.
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder executorService(ExecutorService executorService, boolean shutdownOnClose)
Defines the executor service to use when calling future methods on the RestCall
class.
This executor service is used to create Future
objects on the following methods:
RestCall.runFuture()
RestCall.getResponseFuture(Class)
RestCall.getResponseFuture(Type,Type...)
RestCall.getResponseAsString()
The default executor service is a single-threaded ThreadPoolExecutor
with a 30 second timeout
and a queue size of 10.
executorService
- The executor service.shutdownOnClose
- Call ExecutorService.shutdown()
when RestClient.close()
is called.public RestClientBuilder header(String key, Object value)
key
- The header name.value
- The header value.public RestClientBuilder keepHttpClientOpen(boolean value)
Don't close this client when the RestClient.close()
method is called.
value
- The new value for this property.
public RestClientBuilder interceptors(RestCallInterceptor... value)
Adds an interceptor that gets called immediately after a connection is made.
value
- The values to add to this setting.public RestClientBuilder parser(Class<? extends Parser> value)
The parser to use for parsing POJOs in response bodies.
value
- The new value for this setting.
JsonParser.DEFAULT
.public RestClientBuilder parser(Parser value)
Same as parser(Parser)
except takes in a parser instance.
value
- The new value for this setting.
JsonParser.DEFAULT
.public RestClientBuilder partSerializer(Class<? extends HttpPartSerializer> value)
The serializer to use for serializing POJOs in form data, query parameters, headers, and path variables.
value
- The new value for this setting.
SimpleUonPartSerializer
.public RestClientBuilder partSerializer(HttpPartSerializer value)
Same as partSerializer(Class)
but takes in a parser instance.
value
- The new value for this setting.
SimpleUonPartSerializer
.public RestClientBuilder retryable(int retries, int interval, RetryOn retryOn)
retries
- The number of retries to attempt.interval
- The time in milliseconds between attempts.retryOn
- Optional object used for determining whether a retry should be attempted.
If RetryOn.DEFAULT
.public RestClientBuilder rootUrl(Object value)
When set, relative URL strings passed in through the various rest call methods (e.g. RestClient.doGet(Object)
will be prefixed with the specified root.
This root URL is ignored on those methods if you pass in a URL
, URI
, or an absolute URL string.
value
- The root URL to prefix to relative URL strings.
String
but you can also pass in URI
and URL
objects as well.public RestClientBuilder query(String key, Object value)
key
- The query parameter name.value
- The query parameter value value.public RestClientBuilder serializer(Class<? extends Serializer> value)
The serializer to use for serializing POJOs in request bodies.
value
- The new value for this setting.
JsonSerializer
.public RestClientBuilder serializer(Serializer value)
Same as serializer(Class)
but takes in a serializer instance.
value
- The new value for this setting.
JsonSerializer
.public RestClientBuilder abridged(boolean value)
When enabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level type information that might normally be included to determine the data type will not be serialized.
value
- The new value for this property.
public RestClientBuilder abridged()
Shortcut for calling abridged(
.
public RestClientBuilder addBeanTypeProperties(boolean value)
If
value
- The new value for this property.
public RestClientBuilder detectRecursions(boolean value)
Specifies that recursions should be checked for during serialization.
value
- The new value for this property.
public RestClientBuilder detectRecursions()
Shortcut for calling detectRecursions(
.
public RestClientBuilder ignoreRecursions(boolean value)
If
value
- The new value for this property.
public RestClientBuilder ignoreRecursions()
Shortcut for calling ignoreRecursions(
.
public RestClientBuilder initialDepth(int value)
The initial indentation level at the root.
value
- The new value for this property.
0
.public RestClientBuilder listenerS(Class<? extends SerializerListener> value)
Class used to listen for errors and warnings that occur during serialization.
value
- The new value for this property.public RestClientBuilder maxDepth(int value)
Abort serialization if specified depth is reached in the POJO tree.
If this depth is exceeded, an exception is thrown.
This prevents stack overflows from occurring when trying to serialize models with recursive references.
value
- The new value for this property.
100
.public RestClientBuilder maxIndent(boolean value)
Specifies the maximum indentation level in the serialized document.
value
- The new value for this property.
100
.public RestClientBuilder quoteChar(char value)
This is the character used for quoting attributes and values.
value
- The new value for this property.
public RestClientBuilder sq()
Shortcut for calling quoteChar(
.
public RestClientBuilder sortCollections(boolean value)
Copies and sorts the contents of arrays and collections before serializing them.
value
- The new value for this property.
public RestClientBuilder sortCollections()
Shortcut for calling sortCollections(
.
public RestClientBuilder sortMaps(boolean value)
Serializer.SERIALIZER_sortMaps
property on all serializers in this group.
Copies and sorts the contents of maps before serializing them.
value
- The new value for this property.public RestClientBuilder sortMaps()
Shortcut for calling sortMaps(
.
public RestClientBuilder trimEmptyCollections(boolean value)
If
value
- The new value for this property.
public RestClientBuilder trimEmptyCollections()
Shortcut for calling trimEmptyCollections(
.
public RestClientBuilder trimEmptyMaps(boolean value)
If
value
- The new value for this property.
public RestClientBuilder trimEmptyMaps()
Shortcut for calling trimEmptyMaps(
.
public RestClientBuilder trimNullProperties(boolean value)
If
value
- The new value for this property.
public RestClientBuilder trimStringsS(boolean value)
If String.trim()
before being serialized.
value
- The new value for this property.
public RestClientBuilder trimStringsS()
Shortcut for calling trimStrings(
.
public RestClientBuilder uriContext(UriContext value)
Bean used for resolution of URIs to absolute or root-relative form.
value
- The new value for this property.public RestClientBuilder uriRelativity(UriRelativity value)
Defines what relative URIs are relative to when serializing URI/URL objects.
value
- The new value for this property.
UriRelativity.RESOURCE
public RestClientBuilder uriResolution(UriResolution value)
Defines the resolution level for URIs when serializing URI/URL objects.
value
- The new value for this property.
UriResolution.NONE
public RestClientBuilder useWhitespace(boolean value)
If
value
- The new value for this property.
public RestClientBuilder useWhitespace()
Shortcut for calling useWhitespace(
.
public RestClientBuilder ws()
Shortcut for calling useWhitespace(
.
public RestClientBuilder autoCloseStreams(boolean value)
value
- The new value for this property.
public RestClientBuilder autoCloseStreams()
Shortcut for calling autoCloseStreams(
.
public RestClientBuilder fileCharset(String value)
The character set to use for reading Files
from the file system.
value
- The new value for this property.
public RestClientBuilder inputStreamCharset(String value)
The character set to use for converting InputStreams
and byte arrays to readers.
value
- The new value for this property.
public RestClientBuilder listenerP(Class<? extends ParserListener> value)
Class used to listen for errors and warnings that occur during parsing.
value
- The new value for this property.public RestClientBuilder strict(boolean value)
If
value
- The new value for this property.
public RestClientBuilder strict()
Shortcut for calling strict(
.
public RestClientBuilder trimStringsP(boolean value)
If String.trim()
before being added to
the POJO.
value
- The new value for this property.
public RestClientBuilder trimStringsP()
Shortcut for calling trimStrings(
.
public RestClientBuilder unbuffered(boolean value)
value
- The new value for this property.
public RestClientBuilder unbuffered()
Shortcut for calling unbuffered(
.
public RestClientBuilder paramFormat(String value)
value
- The new value for this property.public RestClientBuilder paramFormatPlain()
public RestClientBuilder beansRequireDefaultConstructor(boolean value)
BeanContextBuilder
If
Otherwise, the bean will be serialized as a string using the Object.toString()
method.
beansRequireDefaultConstructor
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder beansRequireDefaultConstructor()
BeanContextBuilder
Shortcut for calling beansRequireDefaultConstructor(
.
beansRequireDefaultConstructor
in class BeanContextBuilder
public RestClientBuilder beansRequireSerializable(boolean value)
BeanContextBuilder
If Serializable
interface to be considered a bean.
Otherwise, the bean will be serialized as a string using the Object.toString()
method.
beansRequireSerializable
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder beansRequireSerializable()
BeanContextBuilder
Shortcut for calling beansRequireSerializable(
.
beansRequireSerializable
in class BeanContextBuilder
public RestClientBuilder beansRequireSettersForGetters(boolean value)
BeanContextBuilder
If
Otherwise, they will be ignored.
beansRequireSettersForGetters
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder beansRequireSettersForGetters()
BeanContextBuilder
Shortcut for calling beansRequireSettersForGetters(
.
beansRequireSettersForGetters
in class BeanContextBuilder
public RestClientBuilder beansRequireSomeProperties(boolean value)
BeanContextBuilder
If
Otherwise, the bean will be serialized as a string using the Object.toString()
method.
beansRequireSomeProperties
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder beanMapPutReturnsOldValue(boolean value)
BeanContextBuilder
If BeanMap.put()
method will return old property
values.
Otherwise, it returns
beanMapPutReturnsOldValue
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder beanMapPutReturnsOldValue()
BeanContextBuilder
Shortcut for calling beanMapPutReturnsOldValue(
.
beanMapPutReturnsOldValue
in class BeanContextBuilder
public RestClientBuilder beanConstructorVisibility(Visibility value)
BeanContextBuilder
Only look for constructors with the specified minimum visibility.
beanConstructorVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
.public RestClientBuilder beanClassVisibility(Visibility value)
BeanContextBuilder
Classes are not considered beans unless they meet the minimum visibility requirements.
For example, if the visibility is PUBLIC
and the bean class is
beanClassVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
.public RestClientBuilder beanFieldVisibility(Visibility value)
BeanContextBuilder
Only look for bean fields with the specified minimum visibility.
beanFieldVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
.public RestClientBuilder beanMethodVisibility(Visibility value)
BeanContextBuilder
Only look for bean methods with the specified minimum visibility.
beanMethodVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
public RestClientBuilder useJavaBeanIntrospector(boolean value)
BeanContextBuilder
Using the built-in Java bean introspector will not pick up fields or non-standard getters/setters.
@Bean
annotations will be ignored if you enable this setting.
useJavaBeanIntrospector
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder useJavaBeanIntrospector()
BeanContextBuilder
Shortcut for calling useJavaBeanIntrospector(
.
useJavaBeanIntrospector
in class BeanContextBuilder
public RestClientBuilder useInterfaceProxies(boolean value)
BeanContextBuilder
If InvocationHandler
if there is no other way of instantiating them.
useInterfaceProxies
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder ignoreUnknownBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreUnknownBeanProperties
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder ignoreUnknownBeanProperties()
BeanContextBuilder
Shortcut for calling ignoreUnknownBeanProperties(
.
ignoreUnknownBeanProperties
in class BeanContextBuilder
public RestClientBuilder ignoreUnknownNullBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreUnknownNullBeanProperties
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder ignorePropertiesWithoutSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignorePropertiesWithoutSetters
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder ignoreInvocationExceptionsOnGetters(boolean value)
BeanContextBuilder
If BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnGetters
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder ignoreInvocationExceptionsOnGetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnGetters(
.
ignoreInvocationExceptionsOnGetters
in class BeanContextBuilder
public RestClientBuilder ignoreInvocationExceptionsOnSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnSetters
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder ignoreInvocationExceptionsOnSetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnSetters(
.
ignoreInvocationExceptionsOnSetters
in class BeanContextBuilder
public RestClientBuilder sortProperties(boolean value)
BeanContextBuilder
When
sortProperties
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder sortProperties()
BeanContextBuilder
Shortcut for calling sortProperties(
.
sortProperties
in class BeanContextBuilder
public RestClientBuilder notBeanPackages(Object... values)
BeanContextBuilder
notBeanPackages
in class BeanContextBuilder
values
- The values to add to this property.
public RestClientBuilder notBeanPackages(String... values)
BeanContextBuilder
notBeanPackages
in class BeanContextBuilder
values
- The values to add to this property.public RestClientBuilder notBeanPackages(boolean append, Object... values)
BeanContextBuilder
When specified, the current list of ignore packages are appended to.
notBeanPackages
in class BeanContextBuilder
append
- If values
- The new values for this property.
public RestClientBuilder notBeanPackagesRemove(Object... values)
BeanContextBuilder
notBeanPackagesRemove
in class BeanContextBuilder
values
- public RestClientBuilder notBeanClasses(Object... values)
BeanContextBuilder
List of classes that should not be treated as beans even if they appear to be bean-like.
Not-bean classes are converted to Strings
during serialization.
notBeanClasses
in class BeanContextBuilder
values
- The values to add to this property.
public RestClientBuilder notBeanClasses(Class<?>... values)
BeanContextBuilder
List of classes that should not be treated as beans even if they appear to be bean-like.
Not-bean classes are converted to Strings
during serialization.
notBeanClasses
in class BeanContextBuilder
values
- The values to add to this property.public RestClientBuilder notBeanClasses(boolean append, Object... values)
BeanContextBuilder
Not-bean classes are converted to Strings
during serialization even if they appear to be
bean-like.
notBeanClasses
in class BeanContextBuilder
append
- If values
- The new value for this property.
public RestClientBuilder notBeanClassesRemove(Object... values)
BeanContextBuilder
notBeanClassesRemove
in class BeanContextBuilder
values
- The values to remove from this property.
public RestClientBuilder beanFilters(Object... values)
BeanContextBuilder
This is a programmatic equivalent to the @Bean
annotation.
It's useful when you want to use the Bean annotation functionality, but you don't have the ability to alter
the bean classes.
beanFilters
in class BeanContextBuilder
values
- The values to add to this property.
@Bean.typeName()
.
BeanDictionaryList
containing a collection of bean classes with type name annotations.
BeanDictionaryMap
containing a mapping of type names to classes without type name annotations.
public RestClientBuilder beanFilters(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...)
but takes in an array of classes.
beanFilters
in class BeanContextBuilder
values
- The values to add to this property.public RestClientBuilder beanFilters(boolean append, Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...)
but allows you to optionally overwrite the previous value.
beanFilters
in class BeanContextBuilder
append
- If values
- The new values for this property.
@Bean.typeName()
.
BeanDictionaryList
containing a collection of bean classes with type name annotations.
BeanDictionaryMap
containing a mapping of type names to classes without type name annotations.
public RestClientBuilder beanFiltersRemove(Object... values)
BeanContextBuilder
Removes from the list of classes that make up the bean filters in this bean context.
beanFiltersRemove
in class BeanContextBuilder
values
- The values to remove from this property.
@Bean.typeName()
.
BeanDictionaryList
containing a collection of bean classes with type name annotations.
BeanDictionaryMap
containing a mapping of type names to classes without type name annotations.
public RestClientBuilder pojoSwaps(Object... values)
BeanContextBuilder
pojoSwaps
in class BeanContextBuilder
values
- The values to add to this property.
PojoSwap
.
SurrogateSwap
.
public RestClientBuilder pojoSwaps(Class<?>... values)
BeanContextBuilder
pojoSwaps
in class BeanContextBuilder
values
- The values to add to this property.public RestClientBuilder pojoSwaps(boolean append, Object... values)
BeanContextBuilder
POJO swaps are used to "swap out" non-serializable classes with serializable equivalents during serialization, and "swap in" the non-serializable class during parsing.
An example of a POJO swap would be a Calendar
object that gets swapped out for an ISO8601 string.
pojoSwaps
in class BeanContextBuilder
append
- If values
- The new value for this property.
public RestClientBuilder pojoSwapsRemove(Object... values)
BeanContextBuilder
pojoSwapsRemove
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public RestClientBuilder implClasses(Map<String,Class<?>> values)
BeanContextBuilder
For interfaces and abstract classes this method can be used to specify an implementation class for the interface/abstract class so that instances of the implementation class are used when instantiated (e.g. during a parse).
implClasses
in class BeanContextBuilder
values
- The new value for this property.public <T> RestClientBuilder implClass(Class<T> interfaceClass, Class<? extends T> implClass)
BeanContextBuilder
implClass
in class BeanContextBuilder
T
- The class type of the interface.interfaceClass
- The interface class.implClass
- The implementation class.public RestClientBuilder beanDictionary(Object... values)
BeanContextBuilder
Adds to the list of classes that make up the bean dictionary in this bean context.
beanDictionary
in class BeanContextBuilder
values
- The values to add to this property.public RestClientBuilder beanDictionary(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but takes in an array of classes.
beanDictionary
in class BeanContextBuilder
values
- The values to add to this property.public RestClientBuilder beanDictionary(boolean append, Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but allows you to optionally overwrite the previous value.
beanDictionary
in class BeanContextBuilder
append
- If values
- The new values for this property.public RestClientBuilder beanDictionaryRemove(Object... values)
BeanContextBuilder
Removes from the list of classes that make up the bean dictionary in this bean context.
beanDictionaryRemove
in class BeanContextBuilder
values
- The values to remove from this property.public RestClientBuilder beanTypePropertyName(String value)
BeanContextBuilder
This specifies the name of the bean property used to store the dictionary name of a bean type so that the parser knows the data type to reconstruct.
beanTypePropertyName
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder locale(Locale value)
BeanContextBuilder
Specifies a default locale for serializer and parser sessions.
locale
in class BeanContextBuilder
value
- The new value for this property.public RestClientBuilder timeZone(TimeZone value)
BeanContextBuilder
timeZone
in class BeanContextBuilder
value
- The new value for this property.public RestClientBuilder mediaType(MediaType value)
BeanContextBuilder
Specifies a default media type value for serializer and parser sessions.
mediaType
in class BeanContextBuilder
value
- The new value for this property.public RestClientBuilder debug()
BeanContextBuilder
Shortcut for calling debug(
.
debug
in class BeanContextBuilder
public RestClientBuilder set(String name, Object value)
ContextBuilder
set
in class BeanContextBuilder
name
- The property name.value
- The property value.PropertyStoreBuilder.set(String, Object)
public RestClientBuilder set(boolean append, String name, Object value)
ContextBuilder
set
in class BeanContextBuilder
append
- If name
- The property name.value
- The property value.PropertyStoreBuilder.set(String, Object)
public RestClientBuilder set(Map<String,Object> properties)
ContextBuilder
set
in class BeanContextBuilder
properties
- The properties to set on this class.PropertyStoreBuilder.set(java.util.Map)
public RestClientBuilder add(Map<String,Object> properties)
ContextBuilder
add
in class BeanContextBuilder
properties
- The properties to set on this class.PropertyStoreBuilder.add(java.util.Map)
public RestClientBuilder addTo(String name, Object value)
ContextBuilder
addTo
in class BeanContextBuilder
name
- The property name.value
- The new value to add to the SET property.public RestClientBuilder addTo(String name, String key, Object value)
ContextBuilder
addTo
in class BeanContextBuilder
name
- The property name.key
- The property value map key.value
- The property value map value.public RestClientBuilder removeFrom(String name, Object value)
ContextBuilder
removeFrom
in class BeanContextBuilder
name
- The property name.value
- The property value in the SET property.public RestClientBuilder apply(PropertyStore copyFrom)
ContextBuilder
apply
in class BeanContextBuilder
copyFrom
- The factory whose settings are being copied.public RestClientBuilder setRedirectStrategy(org.apache.http.client.RedirectStrategy redirectStrategy)
redirectStrategy
- HttpClientBuilder.setRedirectStrategy(RedirectStrategy)
public RestClientBuilder setDefaultCookieSpecRegistry(org.apache.http.config.Lookup<org.apache.http.cookie.CookieSpecProvider> cookieSpecRegistry)
cookieSpecRegistry
- HttpClientBuilder.setDefaultCookieSpecRegistry(Lookup)
public RestClientBuilder setRequestExecutor(org.apache.http.protocol.HttpRequestExecutor requestExec)
requestExec
- HttpClientBuilder.setRequestExecutor(HttpRequestExecutor)
public RestClientBuilder setSSLHostnameVerifier(HostnameVerifier hostnameVerifier)
hostnameVerifier
- HttpClientBuilder.setSSLHostnameVerifier(HostnameVerifier)
public RestClientBuilder setPublicSuffixMatcher(org.apache.http.conn.util.PublicSuffixMatcher publicSuffixMatcher)
publicSuffixMatcher
- HttpClientBuilder.setPublicSuffixMatcher(PublicSuffixMatcher)
public RestClientBuilder setSSLContext(SSLContext sslContext)
sslContext
- HttpClientBuilder.setSSLContext(SSLContext)
public RestClientBuilder setSSLSocketFactory(org.apache.http.conn.socket.LayeredConnectionSocketFactory sslSocketFactory)
sslSocketFactory
- HttpClientBuilder.setSSLSocketFactory(LayeredConnectionSocketFactory)
public RestClientBuilder setMaxConnTotal(int maxConnTotal)
maxConnTotal
- HttpClientBuilder.setMaxConnTotal(int)
public RestClientBuilder setMaxConnPerRoute(int maxConnPerRoute)
maxConnPerRoute
- HttpClientBuilder.setMaxConnPerRoute(int)
public RestClientBuilder setDefaultSocketConfig(org.apache.http.config.SocketConfig config)
config
- HttpClientBuilder.setDefaultSocketConfig(SocketConfig)
public RestClientBuilder setDefaultConnectionConfig(org.apache.http.config.ConnectionConfig config)
config
- HttpClientBuilder.setDefaultConnectionConfig(ConnectionConfig)
public RestClientBuilder setConnectionTimeToLive(long connTimeToLive, TimeUnit connTimeToLiveTimeUnit)
connTimeToLive
- connTimeToLiveTimeUnit
- HttpClientBuilder.setConnectionTimeToLive(long,TimeUnit)
public RestClientBuilder setConnectionManager(org.apache.http.conn.HttpClientConnectionManager connManager)
connManager
- HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
public RestClientBuilder setConnectionManagerShared(boolean shared)
shared
- HttpClientBuilder.setConnectionManagerShared(boolean)
public RestClientBuilder setConnectionReuseStrategy(org.apache.http.ConnectionReuseStrategy reuseStrategy)
reuseStrategy
- HttpClientBuilder.setConnectionReuseStrategy(ConnectionReuseStrategy)
public RestClientBuilder setKeepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)
keepAliveStrategy
- HttpClientBuilder.setKeepAliveStrategy(ConnectionKeepAliveStrategy)
public RestClientBuilder setTargetAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy targetAuthStrategy)
targetAuthStrategy
- HttpClientBuilder.setTargetAuthenticationStrategy(AuthenticationStrategy)
public RestClientBuilder setProxyAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy proxyAuthStrategy)
proxyAuthStrategy
- HttpClientBuilder.setProxyAuthenticationStrategy(AuthenticationStrategy)
public RestClientBuilder setUserTokenHandler(org.apache.http.client.UserTokenHandler userTokenHandler)
userTokenHandler
- HttpClientBuilder.setUserTokenHandler(UserTokenHandler)
public RestClientBuilder disableConnectionState()
HttpClientBuilder.disableConnectionState()
public RestClientBuilder setSchemePortResolver(org.apache.http.conn.SchemePortResolver schemePortResolver)
schemePortResolver
- HttpClientBuilder.setSchemePortResolver(SchemePortResolver)
public RestClientBuilder setUserAgent(String userAgent)
userAgent
- HttpClientBuilder.setUserAgent(String)
public RestClientBuilder setDefaultHeaders(Collection<? extends org.apache.http.Header> defaultHeaders)
defaultHeaders
- HttpClientBuilder.setDefaultHeaders(Collection)
public RestClientBuilder addInterceptorFirst(org.apache.http.HttpResponseInterceptor itcp)
itcp
- HttpClientBuilder.addInterceptorFirst(HttpResponseInterceptor)
public RestClientBuilder addInterceptorLast(org.apache.http.HttpResponseInterceptor itcp)
itcp
- HttpClientBuilder.addInterceptorLast(HttpResponseInterceptor)
public RestClientBuilder addInterceptorFirst(org.apache.http.HttpRequestInterceptor itcp)
itcp
- HttpClientBuilder.addInterceptorFirst(HttpRequestInterceptor)
public RestClientBuilder addInterceptorLast(org.apache.http.HttpRequestInterceptor itcp)
itcp
- HttpClientBuilder.addInterceptorLast(HttpRequestInterceptor)
public RestClientBuilder disableCookieManagement()
HttpClientBuilder.disableCookieManagement()
public RestClientBuilder disableContentCompression()
HttpClientBuilder.disableContentCompression()
public RestClientBuilder disableAuthCaching()
HttpClientBuilder.disableAuthCaching()
public RestClientBuilder setHttpProcessor(org.apache.http.protocol.HttpProcessor httpprocessor)
httpprocessor
- HttpClientBuilder.setHttpProcessor(HttpProcessor)
public RestClientBuilder setRetryHandler(org.apache.http.client.HttpRequestRetryHandler retryHandler)
retryHandler
- HttpClientBuilder.setRetryHandler(HttpRequestRetryHandler)
public RestClientBuilder disableAutomaticRetries()
HttpClientBuilder.disableAutomaticRetries()
public RestClientBuilder setProxy(org.apache.http.HttpHost proxy)
proxy
- HttpClientBuilder.setProxy(HttpHost)
public RestClientBuilder setRoutePlanner(org.apache.http.conn.routing.HttpRoutePlanner routePlanner)
routePlanner
- HttpClientBuilder.setRoutePlanner(HttpRoutePlanner)
public RestClientBuilder disableRedirectHandling()
HttpClientBuilder.disableRedirectHandling()
public RestClientBuilder setConnectionBackoffStrategy(org.apache.http.client.ConnectionBackoffStrategy connectionBackoffStrategy)
connectionBackoffStrategy
- HttpClientBuilder.setConnectionBackoffStrategy(ConnectionBackoffStrategy)
public RestClientBuilder setBackoffManager(org.apache.http.client.BackoffManager backoffManager)
backoffManager
- HttpClientBuilder.setBackoffManager(BackoffManager)
public RestClientBuilder setServiceUnavailableRetryStrategy(org.apache.http.client.ServiceUnavailableRetryStrategy serviceUnavailStrategy)
serviceUnavailStrategy
- HttpClientBuilder.setServiceUnavailableRetryStrategy(ServiceUnavailableRetryStrategy)
public RestClientBuilder setDefaultCookieStore(org.apache.http.client.CookieStore cookieStore)
cookieStore
- HttpClientBuilder.setDefaultCookieStore(CookieStore)
public RestClientBuilder setDefaultCredentialsProvider(org.apache.http.client.CredentialsProvider credentialsProvider)
credentialsProvider
- HttpClientBuilder.setDefaultCredentialsProvider(CredentialsProvider)
public RestClientBuilder setDefaultAuthSchemeRegistry(org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> authSchemeRegistry)
authSchemeRegistry
- HttpClientBuilder.setDefaultAuthSchemeRegistry(Lookup)
public RestClientBuilder setContentDecoderRegistry(Map<String,org.apache.http.client.entity.InputStreamFactory> contentDecoderMap)
contentDecoderMap
- HttpClientBuilder.setContentDecoderRegistry(Map)
public RestClientBuilder setDefaultRequestConfig(org.apache.http.client.config.RequestConfig config)
config
- HttpClientBuilder.setDefaultRequestConfig(RequestConfig)
public RestClientBuilder useSystemProperties()
HttpClientBuilder.useSystemProperties()
public RestClientBuilder evictExpiredConnections()
HttpClientBuilder.evictExpiredConnections()
public RestClientBuilder evictIdleConnections(long maxIdleTime, TimeUnit maxIdleTimeUnit)
maxIdleTime
- maxIdleTimeUnit
- HttpClientBuilder.evictIdleConnections(long,TimeUnit)
Copyright © 2018 Apache. All rights reserved.