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 | Constructor and Description |
---|---|
protected |
RestClientBuilder(PropertyStore ps,
org.apache.http.impl.client.HttpClientBuilder httpClientBuilder)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
RestClientBuilder |
accept(Object value)
Sets the value for the
|
RestClientBuilder |
acceptCharset(Object value)
Sets the value for the
|
RestClientBuilder |
acceptEncoding(Object value)
Sets the value for the
|
RestClientBuilder |
acceptLanguage(Object value)
Sets the value for the
|
RestClientBuilder |
add(Map<String,Object> properties)
Adds multiple configuration properties on this object.
|
RestClientBuilder |
addBeanTypes()
Configuration property: Add
|
RestClientBuilder |
addBeanTypes(boolean value)
Configuration property: Add
|
RestClientBuilder |
addInterceptorFirst(org.apache.http.HttpRequestInterceptor itcp)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.addInterceptorFirst(HttpRequestInterceptor) . |
RestClientBuilder |
addInterceptorFirst(org.apache.http.HttpResponseInterceptor itcp)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.addInterceptorFirst(HttpResponseInterceptor) . |
RestClientBuilder |
addInterceptorLast(org.apache.http.HttpRequestInterceptor itcp)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.addInterceptorLast(HttpRequestInterceptor) . |
RestClientBuilder |
addInterceptorLast(org.apache.http.HttpResponseInterceptor itcp)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.addInterceptorLast(HttpResponseInterceptor) . |
RestClientBuilder |
addRootType()
Configuration property: Add type attribute to root nodes.
|
RestClientBuilder |
addRootType(boolean value)
Configuration property: Add type attribute to root nodes.
|
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 |
applyAnnotations(AnnotationList al,
VarResolverSession vrs)
Applies a set of annotations to this property store.
|
RestClientBuilder |
applyAnnotations(Class<?> fromClass)
Applies any of the various
|
RestClientBuilder |
applyAnnotations(Method fromMethod)
Applies any of the various
|
RestClientBuilder |
authorization(Object value)
Sets the value for the
|
RestClientBuilder |
autoCloseStreams()
Configuration property: Auto-close streams.
|
RestClientBuilder |
autoCloseStreams(boolean value)
Configuration property: Auto-close streams.
|
RestClientBuilder |
backoffManager(org.apache.http.client.BackoffManager backoffManager)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setBackoffManager(BackoffManager) . |
RestClientBuilder |
basicAuth(String host,
int port,
String user,
String pw)
Deprecated.
Use
getHttpClientBuilder() and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
RestClientBuilder |
beanClassVisibility(Visibility value)
Configuration property: Minimum bean class visibility.
|
RestClientBuilder |
beanConstructorVisibility(Visibility value)
Configuration property: Minimum bean constructor visibility.
|
RestClientBuilder |
beanDictionary(Class<?>... values)
Deprecated.
|
RestClientBuilder |
beanDictionary(Object... values)
Deprecated.
|
RestClientBuilder |
beanDictionaryRemove(Class<?>... values)
Deprecated.
|
RestClientBuilder |
beanDictionaryRemove(Object... values)
Deprecated.
|
RestClientBuilder |
beanDictionaryReplace(Class<?>... values)
Deprecated.
|
RestClientBuilder |
beanDictionaryReplace(Object... values)
Deprecated.
|
RestClientBuilder |
beanFieldVisibility(Visibility value)
Configuration property: Minimum bean field visibility.
|
RestClientBuilder |
beanFilters(Class<?>... values)
Configuration property: Bean filters.
|
RestClientBuilder |
beanFilters(Object... values)
Configuration property: Bean filters.
|
RestClientBuilder |
beanFiltersRemove(Class<?>... values)
Configuration property: Bean filters.
|
RestClientBuilder |
beanFiltersRemove(Object... values)
Configuration property: Bean filters.
|
RestClientBuilder |
beanFiltersReplace(Class<?>... values)
Configuration property: Bean filters.
|
RestClientBuilder |
beanFiltersReplace(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.
|
RestClientBuilder |
binaryInputFormat(BinaryFormat value)
Configuration property: Binary input format.
|
RestClientBuilder |
binaryOutputFormat(BinaryFormat value)
Configuration property: Binary string format.
|
RestClientBuilder |
bpi(Class<?> beanClass,
String value)
Configuration property: Bean property includes.
|
RestClientBuilder |
bpi(Map<String,String> values)
Configuration property: Bean property includes.
|
RestClientBuilder |
bpi(String beanClassName,
String value)
Configuration property: Bean property includes.
|
RestClientBuilder |
bpro(Class<?> beanClass,
String value)
Configuration property: Read-only bean properties.
|
RestClientBuilder |
bpro(Map<String,String> values)
Configuration property: Read-only bean properties.
|
RestClientBuilder |
bpro(String beanClassName,
String value)
Configuration property: Read-only bean properties.
|
RestClientBuilder |
bpwo(Class<?> beanClass,
String properties)
Configuration property: Write-only bean properties.
|
RestClientBuilder |
bpwo(Map<String,String> values)
Configuration property: Write-only bean properties.
|
RestClientBuilder |
bpwo(String beanClassName,
String value)
Configuration property: Write-only bean properties.
|
RestClientBuilder |
bpx(Class<?> beanClass,
String properties)
Configuration property: Bean property excludes.
|
RestClientBuilder |
bpx(Map<String,String> values)
Configuration property: Bean property excludes.
|
RestClientBuilder |
bpx(String beanClassName,
String value)
Configuration property: Bean property excludes.
|
RestClient |
build()
Build the object.
|
RestClientBuilder |
cacheControl(Object value)
Sets the value for the
|
RestClientBuilder |
cipherSuites(String... cipherSuites)
Deprecated.
Use
getHttpClientBuilder() and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
RestClientBuilder |
clientVersion(String version)
Sets the client version by setting the value for the
|
RestClientBuilder |
connection(Object value)
Sets the value for the
|
RestClientBuilder |
connectionBackoffStrategy(org.apache.http.client.ConnectionBackoffStrategy connectionBackoffStrategy)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setConnectionBackoffStrategy(ConnectionBackoffStrategy) . |
RestClientBuilder |
connectionManager(org.apache.http.conn.HttpClientConnectionManager connManager)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
RestClientBuilder |
connectionManagerShared(boolean shared)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setConnectionManagerShared(boolean) . |
RestClientBuilder |
connectionReuseStrategy(org.apache.http.ConnectionReuseStrategy reuseStrategy)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setConnectionReuseStrategy(ConnectionReuseStrategy) . |
RestClientBuilder |
connectionTimeToLive(long connTimeToLive,
TimeUnit connTimeToLiveTimeUnit)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setConnectionTimeToLive(long, TimeUnit) . |
RestClientBuilder |
contentDecoderRegistry(Map<String,org.apache.http.client.entity.InputStreamFactory> contentDecoderMap)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setContentDecoderRegistry(Map) . |
RestClientBuilder |
contentLength(Object value)
Sets the value for the
|
RestClientBuilder |
contentType(Object value)
Sets the value for the
|
protected org.apache.http.conn.HttpClientConnectionManager |
createConnectionManager()
Deprecated.
Use
getHttpClientBuilder() and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
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
|
RestClientBuilder |
debug()
Configuration property: Debug mode.
|
RestClientBuilder |
debug(boolean value)
Configuration property: Debug mode.
|
RestClientBuilder |
debugOutputLines(int value)
Configuration property: Debug output lines.
|
RestClientBuilder |
defaultAuthSchemeRegistry(org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> authSchemeRegistry)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setDefaultAuthSchemeRegistry(Lookup) . |
RestClientBuilder |
defaultConnectionConfig(org.apache.http.config.ConnectionConfig config)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setDefaultConnectionConfig(ConnectionConfig) . |
RestClientBuilder |
defaultCookieSpecRegistry(org.apache.http.config.Lookup<org.apache.http.cookie.CookieSpecProvider> cookieSpecRegistry)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setDefaultCookieSpecRegistry(Lookup) . |
RestClientBuilder |
defaultCookieStore(org.apache.http.client.CookieStore cookieStore)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setDefaultCookieStore(CookieStore) . |
RestClientBuilder |
defaultCredentialsProvider(org.apache.http.client.CredentialsProvider credentialsProvider)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setDefaultCredentialsProvider(CredentialsProvider) . |
RestClientBuilder |
defaultHeaders(Collection<? extends org.apache.http.Header> defaultHeaders)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setDefaultHeaders(Collection) . |
RestClientBuilder |
defaultRequestConfig(org.apache.http.client.config.RequestConfig config)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setDefaultRequestConfig(RequestConfig) . |
RestClientBuilder |
defaultSocketConfig(org.apache.http.config.SocketConfig config)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setDefaultSocketConfig(SocketConfig) . |
RestClientBuilder |
detectRecursions()
Configuration property: Automatically detect POJO recursions.
|
RestClientBuilder |
detectRecursions(boolean value)
Configuration property: Automatically detect POJO recursions.
|
RestClientBuilder |
dictionary(Class<?>... values)
Configuration property: Bean dictionary.
|
RestClientBuilder |
dictionary(Object... values)
Configuration property: Bean dictionary.
|
RestClientBuilder |
dictionaryRemove(Class<?>... values)
Configuration property: Bean dictionary.
|
RestClientBuilder |
dictionaryRemove(Object... values)
Configuration property: Bean dictionary.
|
RestClientBuilder |
dictionaryReplace(Class<?>... values)
Configuration property: Bean dictionary.
|
RestClientBuilder |
dictionaryReplace(Object... values)
Configuration property: Bean dictionary.
|
RestClientBuilder |
disableAuthCaching()
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.disableAuthCaching() . |
RestClientBuilder |
disableAutomaticRetries()
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.disableAutomaticRetries() . |
RestClientBuilder |
disableConnectionState()
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.disableConnectionState() . |
RestClientBuilder |
disableContentCompression()
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.disableContentCompression() . |
RestClientBuilder |
disableCookieManagement()
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.disableCookieManagement() . |
RestClientBuilder |
disableRedirectHandling() |
RestClientBuilder |
enableLaxSSL()
Deprecated.
Use
getHttpClientBuilder() and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
RestClientBuilder |
enableSSL()
Deprecated.
Use
getHttpClientBuilder() and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
RestClientBuilder |
evictExpiredConnections()
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.evictExpiredConnections() . |
RestClientBuilder |
evictIdleConnections(long maxIdleTime,
TimeUnit maxIdleTimeUnit)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.evictIdleConnections(long, TimeUnit) . |
<T> RestClientBuilder |
example(Class<T> c,
T o)
Configuration property: POJO example.
|
<T> RestClientBuilder |
exampleJson(Class<T> c,
String value)
Configuration property: POJO example.
|
RestClientBuilder |
executorService(ExecutorService executorService,
boolean shutdownOnClose)
Configuration property: Executor service.
|
RestClientBuilder |
expect(Object value)
Sets the value for the
|
RestClientBuilder |
fileCharset(String value)
Configuration property: File charset.
|
RestClientBuilder |
forwarded(Object value)
Sets the value for the
|
RestClientBuilder |
from(Object value)
Sets the value for the
|
org.apache.http.impl.client.CloseableHttpClient |
getHttpClient()
Returns the
HttpClient to be used to handle all HTTP communications with the target server. |
org.apache.http.impl.client.HttpClientBuilder |
getHttpClientBuilder()
|
RestClientBuilder |
header(String key,
Object value)
Configuration property: Request headers.
|
RestClientBuilder |
headers(Map<String,Object> headers)
Sets arbitrary request headers.
|
RestClientBuilder |
host(Object value)
Sets the value for the
|
RestClientBuilder |
hostnameVerifier(HostnameVerifier hostnameVerifier)
Deprecated.
Use
getHttpClientBuilder() and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
RestClientBuilder |
html()
Convenience method for specifying HTML as the transmission media type.
|
RestClientBuilder |
httpClient(org.apache.http.impl.client.CloseableHttpClient value)
Sets the
HttpClient to be used to handle all HTTP communications with the target server. |
RestClientBuilder |
httpClient(org.apache.http.impl.client.CloseableHttpClient httpClient,
boolean keepHttpClientOpen)
Deprecated.
|
RestClientBuilder |
httpClientBuilder(org.apache.http.impl.client.HttpClientBuilder value)
|
RestClientBuilder |
httpClientConnectionManager(org.apache.http.conn.HttpClientConnectionManager httpClientConnectionManager)
Sets the internal
HttpClientConnectionManager . |
RestClientBuilder |
httpProcessor(org.apache.http.protocol.HttpProcessor httpprocessor)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setHttpProcessor(HttpProcessor) . |
RestClientBuilder |
ifMatch(Object value)
Sets the value for the
|
RestClientBuilder |
ifModifiedSince(Object value)
Sets the value for the
|
RestClientBuilder |
ifNoneMatch(Object value)
Sets the value for the
|
RestClientBuilder |
ifRange(Object value)
Sets the value for the
|
RestClientBuilder |
ifUnmodifiedSince(Object value)
Sets the value for the
|
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.
|
RestClientBuilder |
implClass(Class<?> interfaceClass,
Class<?> 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 |
json()
Convenience method for specifying JSON as the transmission media type.
|
RestClientBuilder |
keepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setKeepAliveStrategy(ConnectionKeepAliveStrategy) . |
RestClientBuilder |
keepHttpClientOpen()
Configuration property: Keep HttpClient open.
|
RestClientBuilder |
keepHttpClientOpen(boolean value)
Configuration property: Keep HttpClient open.
|
RestClientBuilder |
keyManagers(KeyManager... keyManagers)
Deprecated.
Use
getHttpClientBuilder() and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
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 |
marshall(Marshall value)
Configuration property: Marshall
|
RestClientBuilder |
maxConnPerRoute(int maxConnPerRoute)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setMaxConnPerRoute(int) . |
RestClientBuilder |
maxConnTotal(int maxConnTotal)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setMaxConnTotal(int) . |
RestClientBuilder |
maxDepth(int value)
Configuration property: Max serialization depth.
|
RestClientBuilder |
maxForwards(Object value)
Sets the value for the
|
RestClientBuilder |
maxIndent(int value)
Configuration property: Maximum indentation.
|
RestClientBuilder |
mediaType(MediaType value)
Configuration property: Media type.
|
RestClientBuilder |
msgpack()
Convenience method for specifying MessagePack as the transmission media type.
|
RestClientBuilder |
notBeanClasses(Class<?>... values)
Configuration property: Bean class exclusions.
|
RestClientBuilder |
notBeanClasses(Object... values)
Configuration property: Bean class exclusions.
|
RestClientBuilder |
notBeanClassesRemove(Class<?>... values)
Configuration property: Bean class exclusions.
|
RestClientBuilder |
notBeanClassesRemove(Object... values)
Configuration property: Bean class exclusions.
|
RestClientBuilder |
notBeanClassesReplace(Class<?>... values)
Configuration property: Bean class exclusions.
|
RestClientBuilder |
notBeanClassesReplace(Object... values)
Configuration property: Bean class 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 |
notBeanPackagesRemove(String... values)
Configuration property: Bean package exclusions.
|
RestClientBuilder |
notBeanPackagesReplace(Object... values)
Configuration property: Bean package exclusions.
|
RestClientBuilder |
notBeanPackagesReplace(String... values)
Configuration property: Bean package exclusions.
|
RestClientBuilder |
noTrace()
When called,
|
RestClientBuilder |
openapi()
Convenience method for specifying URL-Encoding as the transmission media type.
|
RestClientBuilder |
origin(Object value)
Sets the value for the
|
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 |
partParser(Class<? extends HttpPartParser> value)
Configuration property: Part parser.
|
RestClientBuilder |
partParser(HttpPartParser value)
Configuration property: Part parser.
|
RestClientBuilder |
partSerializer(Class<? extends HttpPartSerializer> value)
Configuration property: Part serializer.
|
RestClientBuilder |
partSerializer(HttpPartSerializer value)
Configuration property: Part serializer.
|
RestClientBuilder |
plainText()
Convenience method for specifying plain-text as the transmission media type.
|
RestClientBuilder |
pojoSwaps(Class<?>... values)
Configuration property: POJO swaps.
|
RestClientBuilder |
pojoSwaps(Object... values)
Configuration property: POJO swaps.
|
RestClientBuilder |
pojoSwapsRemove(Class<?>... values)
Configuration property: POJO swaps.
|
RestClientBuilder |
pojoSwapsRemove(Object... values)
Configuration property: POJO swaps.
|
RestClientBuilder |
pojoSwapsReplace(Class<?>... values)
Configuration property: POJO swaps.
|
RestClientBuilder |
pojoSwapsReplace(Object... values)
Configuration property: POJO swaps.
|
RestClientBuilder |
pooled()
Deprecated.
Use
getHttpClientBuilder() and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
RestClientBuilder |
pragma(Object value)
Sets the value for the
|
RestClientBuilder |
proxy(org.apache.http.HttpHost proxy)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setProxy(HttpHost) . |
RestClientBuilder |
proxyAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy proxyAuthStrategy)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setProxyAuthenticationStrategy(AuthenticationStrategy) . |
RestClientBuilder |
proxyAuthorization(Object value)
Sets the value for the
|
RestClientBuilder |
publicSuffixMatcher(org.apache.http.conn.util.PublicSuffixMatcher publicSuffixMatcher)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setPublicSuffixMatcher(PublicSuffixMatcher) . |
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
|
RestClientBuilder |
redirectStrategy(org.apache.http.client.RedirectStrategy redirectStrategy)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setRedirectStrategy(RedirectStrategy) . |
RestClientBuilder |
referer(Object value)
Sets the value for the
|
RestClientBuilder |
removeFrom(String name,
Object value)
Removes a value from a SET, LIST, or MAP property.
|
RestClientBuilder |
requestExecutor(org.apache.http.protocol.HttpRequestExecutor requestExec)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setRequestExecutor(HttpRequestExecutor) . |
RestClientBuilder |
retryable(int retries,
int interval,
RetryOn retryOn)
Make HTTP calls retryable if an error response (>=400) is received.
|
RestClientBuilder |
retryHandler(org.apache.http.client.HttpRequestRetryHandler retryHandler)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setRetryHandler(HttpRequestRetryHandler) . |
RestClientBuilder |
rootUrl(Object value)
Configuration property: Root URI.
|
RestClientBuilder |
routePlanner(org.apache.http.conn.routing.HttpRoutePlanner routePlanner)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setRoutePlanner(HttpRoutePlanner) . |
RestClientBuilder |
schemePortResolver(org.apache.http.conn.SchemePortResolver schemePortResolver)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setSchemePortResolver(SchemePortResolver) . |
RestClientBuilder |
secureRandom(SecureRandom secureRandom)
Deprecated.
Use
getHttpClientBuilder() and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
RestClientBuilder |
serializer(Class<? extends Serializer> value)
Configuration property: Serializer.
|
RestClientBuilder |
serializer(Serializer value)
Configuration property: Serializer.
|
RestClientBuilder |
serviceUnavailableRetryStrategy(org.apache.http.client.ServiceUnavailableRetryStrategy serviceUnavailStrategy)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setServiceUnavailableRetryStrategy(ServiceUnavailableRetryStrategy) . |
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 |
simpleJson()
Convenience method for specifying Simple JSON as the transmission media type.
|
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 |
sslContext(SSLContext sslContext)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setSSLContext(SSLContext) . |
RestClientBuilder |
sslHostnameVerifier(HostnameVerifier hostnameVerifier)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setSSLHostnameVerifier(HostnameVerifier) . |
RestClientBuilder |
sslProtocols(String... sslProtocols)
Deprecated.
Use
getHttpClientBuilder() and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
RestClientBuilder |
sslSocketFactory(org.apache.http.conn.socket.LayeredConnectionSocketFactory sslSocketFactory)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setSSLSocketFactory(LayeredConnectionSocketFactory) . |
RestClientBuilder |
strict()
Configuration property: Strict mode.
|
RestClientBuilder |
strict(boolean value)
Configuration property: Strict mode.
|
RestClientBuilder |
targetAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy targetAuthStrategy)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setTargetAuthenticationStrategy(AuthenticationStrategy) . |
RestClientBuilder |
te(Object value)
Sets the value for the
|
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 |
trustManagers(TrustManager... trustManagers)
Deprecated.
Use
getHttpClientBuilder() and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager) . |
RestClientBuilder |
unbuffered()
Configuration property: Unbuffered.
|
RestClientBuilder |
unbuffered(boolean value)
Configuration property: Unbuffered.
|
RestClientBuilder |
uon()
Convenience method for specifying UON as the transmission media type.
|
RestClientBuilder |
upgrade(Object value)
Sets the value for the
|
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 |
urlEnc()
Convenience method for specifying URL-Encoding as the transmission media type.
|
RestClientBuilder |
useEnumNames()
Configuration property: Use enum names.
|
RestClientBuilder |
useEnumNames(boolean value)
Configuration property: Use enum names.
|
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
|
RestClientBuilder |
userAgent(String userAgent)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setUserAgent(String) . |
RestClientBuilder |
userTokenHandler(org.apache.http.client.UserTokenHandler userTokenHandler)
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.setUserTokenHandler(UserTokenHandler) . |
RestClientBuilder |
useSystemProperties()
Deprecated.
Use
getHttpClientBuilder() and HttpClientBuilder.useSystemProperties() . |
RestClientBuilder |
useWhitespace()
Configuration property: Use whitespace.
|
RestClientBuilder |
useWhitespace(boolean value)
Configuration property: Use whitespace.
|
RestClientBuilder |
via(Object value)
Sets the value for the
|
RestClientBuilder |
warning(Object value)
Sets the value for the
|
RestClientBuilder |
ws()
Configuration property: Use whitespace.
|
RestClientBuilder |
xml()
Convenience method for specifying XML as the transmission media type.
|
examples, excludeProperties, excludeProperties, excludeProperties, fluentSetters, fluentSetters, includeProperties, includeProperties, includeProperties, propertyNamer
build, getPropertyStore, getPropertyStoreBuilder, peek, peek
protected RestClientBuilder(PropertyStore ps, org.apache.http.impl.client.HttpClientBuilder httpClientBuilder)
ps
- Initial configuration properties for this builder.
httpClientBuilder
- The HTTP client builder to use for this REST client builder.
createHttpClientBuilder()
to instantiate it again.public RestClient build()
ContextBuilder
build
in class BeanContextBuilder
public RestClientBuilder json()
Identical to calling serializer(JsonSerializer.
.
public RestClientBuilder simpleJson()
Identical to calling serializer(SimpleJsonSerializer.
.
public RestClientBuilder xml()
Identical to calling serializer(XmlSerializer.
.
public RestClientBuilder html()
Identical to calling serializer(HtmlSerializer.
.
public RestClientBuilder plainText()
Identical to calling serializer(PlainTextSerializer.
.
public RestClientBuilder msgpack()
Identical to calling serializer(MsgPackSerializer.
.
public RestClientBuilder uon()
Identical to calling serializer(UonSerializer.
.
public RestClientBuilder urlEnc()
Identical to calling serializer(UrlEncodingSerializer.
.
public RestClientBuilder openapi()
Identical to calling serializer(OpenApiSerializer.
.
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 builder can also be specified using the httpClientBuilder(HttpClientBuilder)
method.
The predefined method returns an HttpClientBuilder
with the following settings:
public org.apache.http.impl.client.HttpClientBuilder getHttpClientBuilder()
HttpClientBuilder
that will be used to create the HttpClient
used by RestClient
.
This method can be used to make customizations to the HttpClient
.
If not set via httpClientBuilder(HttpClientBuilder)
, then this object is the one created by createHttpClientBuilder()
.
HttpClientBuilder
that will be used to create the HttpClient
used by RestClient
.public RestClientBuilder httpClientBuilder(org.apache.http.impl.client.HttpClientBuilder value)
HttpClientBuilder
that will be used to create the HttpClient
used by RestClient
.
This can be used to bypass the builder created by createHttpClientBuilder()
method.
value
- The HttpClientBuilder
that will be used to create the HttpClient
used by RestClient
.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
- Error occurred.public org.apache.http.impl.client.CloseableHttpClient getHttpClient()
HttpClient
to be used to handle all HTTP communications with the target server.HttpClient
to be used to handle all HTTP communications with the target server.public RestClientBuilder httpClient(org.apache.http.impl.client.CloseableHttpClient value)
HttpClient
to be used to handle all HTTP communications with the target server.
This can be used to bypass the client created by createHttpClient()
method.
value
- The HttpClient
to be used to handle all HTTP communications with the target server.@Deprecated public RestClientBuilder httpClient(org.apache.http.impl.client.CloseableHttpClient httpClient, boolean keepHttpClientOpen)
httpClient(CloseableHttpClient)
and keepHttpClientOpen(boolean)
.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 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 httpClientConnectionManager(org.apache.http.conn.HttpClientConnectionManager httpClientConnectionManager)
HttpClientConnectionManager
.httpClientConnectionManager
- The HTTP client connection manager.@Deprecated protected org.apache.http.conn.HttpClientConnectionManager createConnectionManager() throws KeyManagementException, NoSuchAlgorithmException
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.HttpClientConnectionManager
returned by createConnectionManager()
.
Subclasses can override this method to provide their own connection manager.
The default implementation returns an instance of a PoolingHttpClientConnectionManager
.
NoSuchAlgorithmException
- Unknown cryptographic algorithm.KeyManagementException
- General key management exception.@Deprecated public RestClientBuilder enableSSL()
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.Used in conjunction with the following methods for setting up SSL parameters:
@Deprecated public RestClientBuilder enableLaxSSL() throws KeyStoreException, NoSuchAlgorithmException
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.Same as calling the following:
builder
.enableSSL()
.hostnameVerifier(
KeyStoreException
- Generic keystore exception.NoSuchAlgorithmException
- Unknown cryptographic algorithm.@Deprecated public RestClientBuilder sslProtocols(String... sslProtocols)
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.
This is the value passed to the SSLConnectionSocketFactory.SSLConnectionSocketFactory(SSLContext,String[],String[],HostnameVerifier)
constructor.
The default value is taken from the system property
If system property is not defined, defaults to {
.
This method is effectively ignored if enableSSL()
has not been called or the client connection manager
has been defined via httpClientConnectionManager(HttpClientConnectionManager)
.
sslProtocols
- The supported SSL protocols.@Deprecated public RestClientBuilder cipherSuites(String... cipherSuites)
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.
This is the value passed to the SSLConnectionSocketFactory.SSLConnectionSocketFactory(SSLContext,String[],String[],HostnameVerifier)
constructor.
The default value is
This method is effectively ignored if enableSSL()
has not been called or the client connection manager
has been defined via httpClientConnectionManager(HttpClientConnectionManager)
.
cipherSuites
- The supported cipher suites.@Deprecated public RestClientBuilder hostnameVerifier(HostnameVerifier hostnameVerifier)
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.
This is the value passed to the SSLConnectionSocketFactory.SSLConnectionSocketFactory(SSLContext,String[],String[],HostnameVerifier)
constructor.
The default value is
This method is effectively ignored if enableSSL()
has not been called or the client connection manager
has been defined via httpClientConnectionManager(HttpClientConnectionManager)
.
hostnameVerifier
- The hostname verifier.@Deprecated public RestClientBuilder keyManagers(KeyManager... keyManagers)
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.
This is the value passed to the SSLContext.init(KeyManager[],TrustManager[],SecureRandom)
method.
The default value is
This method is effectively ignored if enableSSL()
has not been called or the client connection manager
has been defined via httpClientConnectionManager(HttpClientConnectionManager)
.
keyManagers
- The key managers.@Deprecated public RestClientBuilder trustManagers(TrustManager... trustManagers)
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.
This is the value passed to the SSLContext.init(KeyManager[],TrustManager[],SecureRandom)
method.
The default value is
This method is effectively ignored if enableSSL()
has not been called or the client connection manager
has been defined via httpClientConnectionManager(HttpClientConnectionManager)
.
trustManagers
- The trust managers.@Deprecated public RestClientBuilder secureRandom(SecureRandom secureRandom)
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.
This is the value passed to the SSLContext.init(KeyManager[],TrustManager[],SecureRandom)
method.
The default value is
This method is effectively ignored if enableSSL()
has not been called or the client connection manager
has been defined via httpClientConnectionManager(HttpClientConnectionManager)
.
secureRandom
- The random number generator.@Deprecated public RestClientBuilder pooled()
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.createConnectionManager()
method will return a PoolingHttpClientConnectionManager
instead of a BasicHttpClientConnectionManager
.@Deprecated public RestClientBuilder basicAuth(String host, int port, String user, String pw)
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.host
- The auth scope hostname.port
- The auth scope port.user
- The username.pw
- The password.public RestClientBuilder headers(Map<String,Object> headers)
headers
- The headers to set on requests.public RestClientBuilder accept(Object value)
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)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder acceptEncoding(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder acceptLanguage(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder authorization(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder cacheControl(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder clientVersion(String version)
version
- The version string (e.g. public RestClientBuilder connection(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder contentLength(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder contentType(Object value)
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)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder expect(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder forwarded(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder from(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder host(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder ifMatch(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder ifModifiedSince(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder ifNoneMatch(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder ifRange(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder ifUnmodifiedSince(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder maxForwards(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder noTrace()
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)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder pragma(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder proxyAuthorization(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder range(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder referer(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder te(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder userAgent(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder upgrade(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder via(Object value)
This is a shortcut for calling header(
value
- The new header value.public RestClientBuilder warning(Object value)
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 keepHttpClientOpen()
Don't close this client when the RestClient.close()
method is called.
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 marshall(Marshall value)
Shortcut for specifying the RestClient.RESTCLIENT_serializer
and RestClient.RESTCLIENT_parser
using the serializer and parser defined in a marshall.
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 partParser(Class<? extends HttpPartParser> value)
The parser to use for parsing POJOs from form data, query parameters, headers, and path variables.
value
- The new value for this setting.
OpenApiParser
.public RestClientBuilder partParser(HttpPartParser value)
Same as partParser(Class)
but takes in a parser instance.
value
- The new value for this setting.
OpenApiParser
.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.
OpenApiSerializer
.public RestClientBuilder partSerializer(HttpPartSerializer value)
Same as partSerializer(Class)
but takes in a parser instance.
value
- The new value for this setting.
OpenApiSerializer
.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.
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 addBeanTypes(boolean value)
If
value
- The new value for this property.
public RestClientBuilder addBeanTypes()
Shortcut for calling addBeanTypes(
.
public RestClientBuilder addRootType(boolean value)
When disabled, 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 addRootType()
Shortcut for calling addRootType(
.
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.
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.
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 maxIndent(int value)
Specifies the maximum indentation level in the serialized document.
value
- The new value for this property.
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 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 binaryOutputFormat(BinaryFormat value)
When using the Serializer.serializeToString(Object)
method on stream-based serializers, this defines the format to use
when converting the resulting byte array to a string.
value
- The new value for this property.
BinaryFormat.HEX
.public RestClientBuilder autoCloseStreams(boolean value)
value
- The new value for this property.
public RestClientBuilder autoCloseStreams()
Shortcut for calling autoCloseStreams(
.
public RestClientBuilder debugOutputLines(int value)
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 fileCharset(String value)
The character set to use for reading
value
- The new value for this property.
public RestClientBuilder inputStreamCharset(String value)
The character set to use for converting
value
- The new value for this property.
public RestClientBuilder binaryInputFormat(BinaryFormat value)
When using the Parser.parse(Object,Class)
method on stream-based parsers and the input is a string, this defines the format to use
when converting the string into a byte array.
value
- The new value for this property.
BinaryFormat.HEX
.public RestClientBuilder paramFormat(String value)
value
- The new value for this property.public RestClientBuilder paramFormatPlain()
public RestClientBuilder beanClassVisibility(Visibility value)
BeanContextBuilder
Classes are not considered beans unless they meet the minimum visibility requirements.
For example, if the visibility is
beanClassVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
.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
.@Deprecated 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.@Deprecated 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.@Deprecated public RestClientBuilder beanDictionaryReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
beanDictionaryReplace
in class BeanContextBuilder
values
- The new values for this property.@Deprecated public RestClientBuilder beanDictionaryReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
beanDictionaryReplace
in class BeanContextBuilder
values
- The new values for this property.@Deprecated public RestClientBuilder beanDictionaryRemove(Class<?>... 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.@Deprecated 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 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 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(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 beanFiltersReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...)
but replaces the existing values.
beanFiltersReplace
in class BeanContextBuilder
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 beanFiltersReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...)
but replaces the existing values.
beanFiltersReplace
in class BeanContextBuilder
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(Class<?>... 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 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 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 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 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 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 bpi(Class<?> beanClass, String value)
BeanContextBuilder
Specifies the set and order of names of properties associated with the bean class.
bpi
in class BeanContextBuilder
beanClass
- The bean class.value
- Comma-delimited list of property names.public RestClientBuilder bpi(Map<String,String> values)
BeanContextBuilder
Specifies the set and order of names of properties associated with the bean class.
bpi
in class BeanContextBuilder
values
- The new value for this property.public RestClientBuilder bpi(String beanClassName, String value)
BeanContextBuilder
Specifies the set and order of names of properties associated with the bean class.
bpi
in class BeanContextBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public RestClientBuilder bpx(Class<?> beanClass, String properties)
BeanContextBuilder
Specifies to exclude the specified list of properties for the specified bean class.
bpx
in class BeanContextBuilder
beanClass
- The bean class.properties
- Comma-delimited list of property names.public RestClientBuilder bpx(Map<String,String> values)
BeanContextBuilder
Specifies to exclude the specified list of properties for the specified bean classes.
bpx
in class BeanContextBuilder
values
- The new value for this property.public RestClientBuilder bpx(String beanClassName, String value)
BeanContextBuilder
bpx
in class BeanContextBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public RestClientBuilder bpro(Class<?> beanClass, String value)
BeanContextBuilder
Specifies the read-only properties for the specified bean class.
bpro
in class BeanContextBuilder
beanClass
- The bean class.value
- Comma-delimited list of property names.public RestClientBuilder bpro(Map<String,String> values)
BeanContextBuilder
Specifies the read-only properties for the specified bean classes.
bpro
in class BeanContextBuilder
values
- The new value for this property.public RestClientBuilder bpro(String beanClassName, String value)
BeanContextBuilder
Specifies the read-only properties for the specified bean class.
bpro
in class BeanContextBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public RestClientBuilder bpwo(Class<?> beanClass, String properties)
BeanContextBuilder
Specifies the write-only properties for the specified bean class.
bpwo
in class BeanContextBuilder
beanClass
- The bean class.properties
- Comma-delimited list of property names.public RestClientBuilder bpwo(Map<String,String> values)
BeanContextBuilder
Specifies the write-only properties for the specified bean classes.
bpwo
in class BeanContextBuilder
values
- The new value for this property.public RestClientBuilder bpwo(String beanClassName, String value)
BeanContextBuilder
Specifies the write-only properties for the specified bean class.
bpwo
in class BeanContextBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public RestClientBuilder debug()
BeanContextBuilder
Shortcut for calling debug(
.
debug
in class BeanContextBuilder
public RestClientBuilder debug(boolean value)
BeanContextBuilder
Enables the following additional information during serialization:
BeanTraverseContext.BEANTRAVERSE_detectRecursions
.
debug
in class BeanContextBuilder
value
- The new value for this property.
public RestClientBuilder dictionary(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but takes in an array of classes.
dictionary
in class BeanContextBuilder
values
- The values to add to this property.public RestClientBuilder dictionary(Object... values)
BeanContextBuilder
Adds to the list of classes that make up the bean dictionary in this bean context.
dictionary
in class BeanContextBuilder
values
- The values to add to this property.public RestClientBuilder dictionaryReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
dictionaryReplace
in class BeanContextBuilder
values
- The new values for this property.public RestClientBuilder dictionaryReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
dictionaryReplace
in class BeanContextBuilder
values
- The new values for this property.public RestClientBuilder dictionaryRemove(Class<?>... values)
BeanContextBuilder
Removes from the list of classes that make up the bean dictionary in this bean context.
dictionaryRemove
in class BeanContextBuilder
values
- The values to remove from this property.public RestClientBuilder dictionaryRemove(Object... values)
BeanContextBuilder
Removes from the list of classes that make up the bean dictionary in this bean context.
dictionaryRemove
in class BeanContextBuilder
values
- The values to remove from this property.public <T> RestClientBuilder example(Class<T> c, T o)
BeanContextBuilder
Specifies an example of the specified class.
example
in class BeanContextBuilder
c
- The POJO class.o
- An instance of the POJO class used for examples.public <T> RestClientBuilder exampleJson(Class<T> c, String value)
BeanContextBuilder
Specifies an example of the specified class.
exampleJson
in class BeanContextBuilder
T
- The POJO class type.c
- The POJO class.value
- The simple JSON representation of the example.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 ignorePropertiesWithoutSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignorePropertiesWithoutSetters
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 implClass(Class<?> interfaceClass, Class<?> implClass)
BeanContextBuilder
implClass
in class BeanContextBuilder
interfaceClass
- The interface class.implClass
- The implementation class.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 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 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 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
notBeanClasses
in class BeanContextBuilder
values
- The values to add to this property.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
notBeanClasses
in class BeanContextBuilder
values
- The values to add to this property.
public RestClientBuilder notBeanClassesReplace(Class<?>... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace
in class BeanContextBuilder
values
- The new value for this property.public RestClientBuilder notBeanClassesReplace(Object... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace
in class BeanContextBuilder
values
- The new value for this property.
public RestClientBuilder notBeanClassesRemove(Class<?>... values)
BeanContextBuilder
notBeanClassesRemove
in class BeanContextBuilder
values
- The values to remove from this property.public RestClientBuilder notBeanClassesRemove(Object... values)
BeanContextBuilder
notBeanClassesRemove
in class BeanContextBuilder
values
- The values to remove from this property.
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 notBeanPackagesReplace(String... values)
BeanContextBuilder
notBeanPackagesReplace
in class BeanContextBuilder
values
- public RestClientBuilder notBeanPackagesReplace(Object... values)
BeanContextBuilder
notBeanPackagesReplace
in class BeanContextBuilder
values
- public RestClientBuilder notBeanPackagesRemove(String... values)
BeanContextBuilder
notBeanPackagesRemove
in class BeanContextBuilder
values
- The values to remove from this property.public RestClientBuilder notBeanPackagesRemove(Object... values)
BeanContextBuilder
notBeanPackagesRemove
in class BeanContextBuilder
values
- public RestClientBuilder pojoSwaps(Class<?>... values)
BeanContextBuilder
pojoSwaps
in class BeanContextBuilder
values
- The values to add to this property.public RestClientBuilder pojoSwaps(Object... values)
BeanContextBuilder
pojoSwaps
in class BeanContextBuilder
values
- The values to add to this property.
PojoSwap
.
SurrogateSwap
.
public RestClientBuilder pojoSwapsReplace(Class<?>... values)
BeanContextBuilder
pojoSwapsReplace
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public RestClientBuilder pojoSwapsReplace(Object... values)
BeanContextBuilder
pojoSwapsReplace
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public RestClientBuilder pojoSwapsRemove(Class<?>... values)
BeanContextBuilder
pojoSwapsRemove
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public RestClientBuilder pojoSwapsRemove(Object... values)
BeanContextBuilder
pojoSwapsRemove
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
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 timeZone(TimeZone value)
BeanContextBuilder
timeZone
in class BeanContextBuilder
value
- The new value for this property.public RestClientBuilder useEnumNames(boolean value)
BeanContextBuilder
When enabled, enums are always serialized by name instead of using Object.toString()
.
useEnumNames
in class BeanContextBuilder
value
- The property value.public RestClientBuilder useEnumNames()
BeanContextBuilder
When enabled, enums are always serialized by name instead of using Object.toString()
.
useEnumNames
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 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 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(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 applyAnnotations(AnnotationList al, VarResolverSession vrs)
ContextBuilder
applyAnnotations
in class BeanContextBuilder
al
- The list of all annotations annotated with PropertyStoreApply
.vrs
- The string resolver for resolving variables in annotation values.public RestClientBuilder applyAnnotations(Class<?> fromClass)
ContextBuilder
Applies any of the following annotations:
BeanConfig
CsvConfig
HtmlConfig
HtmlDocConfig
JsoConfig
JsonConfig
JsonSchemaConfig
MsgPackConfig
OpenApiConfig
ParserConfig
PlainTextConfig
SerializerConfig
SoapXmlConfig
UonConfig
UrlEncodingConfig
XmlConfig
Annotations are appended in the following order:
applyAnnotations
in class BeanContextBuilder
fromClass
- The class on which the annotations are defined.public RestClientBuilder applyAnnotations(Method fromMethod)
ContextBuilder
Applies any of the following annotations:
BeanConfig
CsvConfig
HtmlConfig
HtmlDocConfig
JsoConfig
JsonConfig
JsonSchemaConfig
MsgPackConfig
OpenApiConfig
ParserConfig
PlainTextConfig
SerializerConfig
SoapXmlConfig
UonConfig
UrlEncodingConfig
XmlConfig
Annotations are appended in the following orders:
applyAnnotations
in class BeanContextBuilder
fromMethod
- The method on which the annotations are defined.public RestClientBuilder disableRedirectHandling()
HttpClientBuilder.disableRedirectHandling()
@Deprecated public RestClientBuilder redirectStrategy(org.apache.http.client.RedirectStrategy redirectStrategy)
getHttpClientBuilder()
and HttpClientBuilder.setRedirectStrategy(RedirectStrategy)
.redirectStrategy
- New property value.HttpClientBuilder.setRedirectStrategy(RedirectStrategy)
@Deprecated public RestClientBuilder defaultCookieSpecRegistry(org.apache.http.config.Lookup<org.apache.http.cookie.CookieSpecProvider> cookieSpecRegistry)
getHttpClientBuilder()
and HttpClientBuilder.setDefaultCookieSpecRegistry(Lookup)
.cookieSpecRegistry
- New property value.HttpClientBuilder.setDefaultCookieSpecRegistry(Lookup)
@Deprecated public RestClientBuilder requestExecutor(org.apache.http.protocol.HttpRequestExecutor requestExec)
getHttpClientBuilder()
and HttpClientBuilder.setRequestExecutor(HttpRequestExecutor)
.requestExec
- New property value.HttpClientBuilder.setRequestExecutor(HttpRequestExecutor)
@Deprecated public RestClientBuilder sslHostnameVerifier(HostnameVerifier hostnameVerifier)
getHttpClientBuilder()
and HttpClientBuilder.setSSLHostnameVerifier(HostnameVerifier)
.hostnameVerifier
- New property value.HttpClientBuilder.setSSLHostnameVerifier(HostnameVerifier)
@Deprecated public RestClientBuilder publicSuffixMatcher(org.apache.http.conn.util.PublicSuffixMatcher publicSuffixMatcher)
getHttpClientBuilder()
and HttpClientBuilder.setPublicSuffixMatcher(PublicSuffixMatcher)
.publicSuffixMatcher
- New property value.HttpClientBuilder.setPublicSuffixMatcher(PublicSuffixMatcher)
@Deprecated public RestClientBuilder sslContext(SSLContext sslContext)
getHttpClientBuilder()
and HttpClientBuilder.setSSLContext(SSLContext)
.sslContext
- New property value.HttpClientBuilder.setSSLContext(SSLContext)
@Deprecated public RestClientBuilder sslSocketFactory(org.apache.http.conn.socket.LayeredConnectionSocketFactory sslSocketFactory)
getHttpClientBuilder()
and HttpClientBuilder.setSSLSocketFactory(LayeredConnectionSocketFactory)
.sslSocketFactory
- New property value.HttpClientBuilder.setSSLSocketFactory(LayeredConnectionSocketFactory)
@Deprecated public RestClientBuilder maxConnTotal(int maxConnTotal)
getHttpClientBuilder()
and HttpClientBuilder.setMaxConnTotal(int)
.maxConnTotal
- New property value.HttpClientBuilder.setMaxConnTotal(int)
@Deprecated public RestClientBuilder maxConnPerRoute(int maxConnPerRoute)
getHttpClientBuilder()
and HttpClientBuilder.setMaxConnPerRoute(int)
.maxConnPerRoute
- New property value.HttpClientBuilder.setMaxConnPerRoute(int)
@Deprecated public RestClientBuilder defaultSocketConfig(org.apache.http.config.SocketConfig config)
getHttpClientBuilder()
and HttpClientBuilder.setDefaultSocketConfig(SocketConfig)
.config
- New property value.HttpClientBuilder.setDefaultSocketConfig(SocketConfig)
@Deprecated public RestClientBuilder defaultConnectionConfig(org.apache.http.config.ConnectionConfig config)
getHttpClientBuilder()
and HttpClientBuilder.setDefaultConnectionConfig(ConnectionConfig)
.config
- New property value.HttpClientBuilder.setDefaultConnectionConfig(ConnectionConfig)
@Deprecated public RestClientBuilder connectionTimeToLive(long connTimeToLive, TimeUnit connTimeToLiveTimeUnit)
getHttpClientBuilder()
and HttpClientBuilder.setConnectionTimeToLive(long, TimeUnit)
.connTimeToLive
- New property value.connTimeToLiveTimeUnit
- New property value.HttpClientBuilder.setConnectionTimeToLive(long,TimeUnit)
@Deprecated public RestClientBuilder connectionManager(org.apache.http.conn.HttpClientConnectionManager connManager)
getHttpClientBuilder()
and HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
.connManager
- New property value.HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
@Deprecated public RestClientBuilder connectionManagerShared(boolean shared)
getHttpClientBuilder()
and HttpClientBuilder.setConnectionManagerShared(boolean)
.shared
- New property value.HttpClientBuilder.setConnectionManagerShared(boolean)
@Deprecated public RestClientBuilder connectionReuseStrategy(org.apache.http.ConnectionReuseStrategy reuseStrategy)
getHttpClientBuilder()
and HttpClientBuilder.setConnectionReuseStrategy(ConnectionReuseStrategy)
.reuseStrategy
- New property value.HttpClientBuilder.setConnectionReuseStrategy(ConnectionReuseStrategy)
@Deprecated public RestClientBuilder keepAliveStrategy(org.apache.http.conn.ConnectionKeepAliveStrategy keepAliveStrategy)
getHttpClientBuilder()
and HttpClientBuilder.setKeepAliveStrategy(ConnectionKeepAliveStrategy)
.keepAliveStrategy
- New property value.HttpClientBuilder.setKeepAliveStrategy(ConnectionKeepAliveStrategy)
@Deprecated public RestClientBuilder targetAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy targetAuthStrategy)
getHttpClientBuilder()
and HttpClientBuilder.setTargetAuthenticationStrategy(AuthenticationStrategy)
.targetAuthStrategy
- New property value.HttpClientBuilder.setTargetAuthenticationStrategy(AuthenticationStrategy)
@Deprecated public RestClientBuilder proxyAuthenticationStrategy(org.apache.http.client.AuthenticationStrategy proxyAuthStrategy)
getHttpClientBuilder()
and HttpClientBuilder.setProxyAuthenticationStrategy(AuthenticationStrategy)
.proxyAuthStrategy
- New property value.HttpClientBuilder.setProxyAuthenticationStrategy(AuthenticationStrategy)
@Deprecated public RestClientBuilder userTokenHandler(org.apache.http.client.UserTokenHandler userTokenHandler)
getHttpClientBuilder()
and HttpClientBuilder.setUserTokenHandler(UserTokenHandler)
.userTokenHandler
- New property value.HttpClientBuilder.setUserTokenHandler(UserTokenHandler)
@Deprecated public RestClientBuilder disableConnectionState()
getHttpClientBuilder()
and HttpClientBuilder.disableConnectionState()
.HttpClientBuilder.disableConnectionState()
@Deprecated public RestClientBuilder schemePortResolver(org.apache.http.conn.SchemePortResolver schemePortResolver)
getHttpClientBuilder()
and HttpClientBuilder.setSchemePortResolver(SchemePortResolver)
.schemePortResolver
- New property value.HttpClientBuilder.setSchemePortResolver(SchemePortResolver)
@Deprecated public RestClientBuilder userAgent(String userAgent)
getHttpClientBuilder()
and HttpClientBuilder.setUserAgent(String)
.userAgent
- New property value.HttpClientBuilder.setUserAgent(String)
@Deprecated public RestClientBuilder defaultHeaders(Collection<? extends org.apache.http.Header> defaultHeaders)
getHttpClientBuilder()
and HttpClientBuilder.setDefaultHeaders(Collection)
.defaultHeaders
- New property value.HttpClientBuilder.setDefaultHeaders(Collection)
@Deprecated public RestClientBuilder addInterceptorFirst(org.apache.http.HttpResponseInterceptor itcp)
getHttpClientBuilder()
and HttpClientBuilder.addInterceptorFirst(HttpResponseInterceptor)
.itcp
- New property value.HttpClientBuilder.addInterceptorFirst(HttpResponseInterceptor)
@Deprecated public RestClientBuilder addInterceptorLast(org.apache.http.HttpResponseInterceptor itcp)
getHttpClientBuilder()
and HttpClientBuilder.addInterceptorLast(HttpResponseInterceptor)
.itcp
- New property value.HttpClientBuilder.addInterceptorLast(HttpResponseInterceptor)
@Deprecated public RestClientBuilder addInterceptorFirst(org.apache.http.HttpRequestInterceptor itcp)
getHttpClientBuilder()
and HttpClientBuilder.addInterceptorFirst(HttpRequestInterceptor)
.itcp
- New property value.HttpClientBuilder.addInterceptorFirst(HttpRequestInterceptor)
@Deprecated public RestClientBuilder addInterceptorLast(org.apache.http.HttpRequestInterceptor itcp)
getHttpClientBuilder()
and HttpClientBuilder.addInterceptorLast(HttpRequestInterceptor)
.itcp
- New property value.HttpClientBuilder.addInterceptorLast(HttpRequestInterceptor)
@Deprecated public RestClientBuilder disableCookieManagement()
getHttpClientBuilder()
and HttpClientBuilder.disableCookieManagement()
.HttpClientBuilder.disableCookieManagement()
@Deprecated public RestClientBuilder disableContentCompression()
getHttpClientBuilder()
and HttpClientBuilder.disableContentCompression()
.HttpClientBuilder.disableContentCompression()
@Deprecated public RestClientBuilder disableAuthCaching()
getHttpClientBuilder()
and HttpClientBuilder.disableAuthCaching()
.HttpClientBuilder.disableAuthCaching()
@Deprecated public RestClientBuilder httpProcessor(org.apache.http.protocol.HttpProcessor httpprocessor)
getHttpClientBuilder()
and HttpClientBuilder.setHttpProcessor(HttpProcessor)
.httpprocessor
- New property value.HttpClientBuilder.setHttpProcessor(HttpProcessor)
@Deprecated public RestClientBuilder retryHandler(org.apache.http.client.HttpRequestRetryHandler retryHandler)
getHttpClientBuilder()
and HttpClientBuilder.setRetryHandler(HttpRequestRetryHandler)
.retryHandler
- New property value.HttpClientBuilder.setRetryHandler(HttpRequestRetryHandler)
@Deprecated public RestClientBuilder disableAutomaticRetries()
getHttpClientBuilder()
and HttpClientBuilder.disableAutomaticRetries()
.HttpClientBuilder.disableAutomaticRetries()
@Deprecated public RestClientBuilder proxy(org.apache.http.HttpHost proxy)
getHttpClientBuilder()
and HttpClientBuilder.setProxy(HttpHost)
.proxy
- New property value.HttpClientBuilder.setProxy(HttpHost)
@Deprecated public RestClientBuilder routePlanner(org.apache.http.conn.routing.HttpRoutePlanner routePlanner)
getHttpClientBuilder()
and HttpClientBuilder.setRoutePlanner(HttpRoutePlanner)
.routePlanner
- New property value.HttpClientBuilder.setRoutePlanner(HttpRoutePlanner)
@Deprecated public RestClientBuilder connectionBackoffStrategy(org.apache.http.client.ConnectionBackoffStrategy connectionBackoffStrategy)
getHttpClientBuilder()
and HttpClientBuilder.setConnectionBackoffStrategy(ConnectionBackoffStrategy)
.connectionBackoffStrategy
- New property value.HttpClientBuilder.setConnectionBackoffStrategy(ConnectionBackoffStrategy)
@Deprecated public RestClientBuilder backoffManager(org.apache.http.client.BackoffManager backoffManager)
getHttpClientBuilder()
and HttpClientBuilder.setBackoffManager(BackoffManager)
.backoffManager
- New property value.HttpClientBuilder.setBackoffManager(BackoffManager)
@Deprecated public RestClientBuilder serviceUnavailableRetryStrategy(org.apache.http.client.ServiceUnavailableRetryStrategy serviceUnavailStrategy)
getHttpClientBuilder()
and HttpClientBuilder.setServiceUnavailableRetryStrategy(ServiceUnavailableRetryStrategy)
.serviceUnavailStrategy
- New property value.HttpClientBuilder.setServiceUnavailableRetryStrategy(ServiceUnavailableRetryStrategy)
@Deprecated public RestClientBuilder defaultCookieStore(org.apache.http.client.CookieStore cookieStore)
getHttpClientBuilder()
and HttpClientBuilder.setDefaultCookieStore(CookieStore)
.cookieStore
- New property value.HttpClientBuilder.setDefaultCookieStore(CookieStore)
@Deprecated public RestClientBuilder defaultCredentialsProvider(org.apache.http.client.CredentialsProvider credentialsProvider)
getHttpClientBuilder()
and HttpClientBuilder.setDefaultCredentialsProvider(CredentialsProvider)
.credentialsProvider
- New property value.HttpClientBuilder.setDefaultCredentialsProvider(CredentialsProvider)
@Deprecated public RestClientBuilder defaultAuthSchemeRegistry(org.apache.http.config.Lookup<org.apache.http.auth.AuthSchemeProvider> authSchemeRegistry)
getHttpClientBuilder()
and HttpClientBuilder.setDefaultAuthSchemeRegistry(Lookup)
.authSchemeRegistry
- New property value.HttpClientBuilder.setDefaultAuthSchemeRegistry(Lookup)
@Deprecated public RestClientBuilder contentDecoderRegistry(Map<String,org.apache.http.client.entity.InputStreamFactory> contentDecoderMap)
getHttpClientBuilder()
and HttpClientBuilder.setContentDecoderRegistry(Map)
.contentDecoderMap
- New property value.HttpClientBuilder.setContentDecoderRegistry(Map)
@Deprecated public RestClientBuilder defaultRequestConfig(org.apache.http.client.config.RequestConfig config)
getHttpClientBuilder()
and HttpClientBuilder.setDefaultRequestConfig(RequestConfig)
.config
- New property value.HttpClientBuilder.setDefaultRequestConfig(RequestConfig)
@Deprecated public RestClientBuilder useSystemProperties()
getHttpClientBuilder()
and HttpClientBuilder.useSystemProperties()
.HttpClientBuilder.useSystemProperties()
@Deprecated public RestClientBuilder evictExpiredConnections()
getHttpClientBuilder()
and HttpClientBuilder.evictExpiredConnections()
.HttpClientBuilder.evictExpiredConnections()
@Deprecated public RestClientBuilder evictIdleConnections(long maxIdleTime, TimeUnit maxIdleTimeUnit)
getHttpClientBuilder()
and HttpClientBuilder.evictIdleConnections(long, TimeUnit)
.maxIdleTime
- New property value.maxIdleTimeUnit
- New property value.HttpClientBuilder.evictIdleConnections(long,TimeUnit)
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.