@Deprecated 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.
Modifier | Constructor and Description |
---|---|
protected |
RestClientBuilder(PropertyStore ps,
HttpClientBuilder httpClientBuilder)
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
RestClientBuilder |
accept(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
acceptCharset(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
acceptEncoding(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
acceptLanguage(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
add(Map<String,Object> properties)
Deprecated.
Adds multiple free-form configuration properties on this object without first clearing out any previous values.
|
RestClientBuilder |
addBeanTypes()
Deprecated.
Configuration property: Add
|
RestClientBuilder |
addBeanTypes(boolean value)
Deprecated.
Configuration property: Add
|
RestClientBuilder |
addInterceptorFirst(HttpRequestInterceptor itcp)
Deprecated.
|
RestClientBuilder |
addInterceptorFirst(HttpResponseInterceptor itcp)
Deprecated.
|
RestClientBuilder |
addInterceptorLast(HttpRequestInterceptor itcp)
Deprecated.
|
RestClientBuilder |
addInterceptorLast(HttpResponseInterceptor itcp)
Deprecated.
|
RestClientBuilder |
addRootType()
Deprecated.
Configuration property: Add type attribute to root nodes.
|
RestClientBuilder |
addRootType(boolean value)
Deprecated.
Configuration property: Add type attribute to root nodes.
|
RestClientBuilder |
addTo(String name,
Object value)
Deprecated.
Adds a free-form value to a SET property.
|
RestClientBuilder |
annotations(Annotation... values)
Deprecated.
|
RestClientBuilder |
apply(PropertyStore copyFrom)
Deprecated.
Copies the settings from the specified property store into this builder.
|
RestClientBuilder |
applyAnnotations(AnnotationList al,
VarResolverSession vrs)
Deprecated.
Applies a set of annotations to this property store.
|
RestClientBuilder |
applyAnnotations(Class<?>... fromClasses)
Deprecated.
Applies any of the various
|
RestClientBuilder |
applyAnnotations(Method... fromMethods)
Deprecated.
Applies any of the various
|
RestClientBuilder |
authorization(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
autoCloseStreams()
Deprecated.
Configuration property: Auto-close streams.
|
RestClientBuilder |
autoCloseStreams(boolean value)
Deprecated.
Configuration property: Auto-close streams.
|
RestClientBuilder |
backoffManager(BackoffManager backoffManager)
Deprecated.
|
RestClientBuilder |
basicAuth(String host,
int port,
String user,
String pw)
Deprecated.
|
RestClientBuilder |
beanClassVisibility(Visibility value)
Deprecated.
|
RestClientBuilder |
beanConstructorVisibility(Visibility value)
Deprecated.
|
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)
Deprecated.
|
RestClientBuilder |
beanFilters(Object... values)
Deprecated.
|
RestClientBuilder |
beanFiltersRemove(Object... values)
Deprecated.
|
RestClientBuilder |
beanFiltersReplace(Object... values)
Deprecated.
|
RestClientBuilder |
beanMapPutReturnsOldValue()
Deprecated.
|
RestClientBuilder |
beanMapPutReturnsOldValue(boolean value)
Deprecated.
|
RestClientBuilder |
beanMethodVisibility(Visibility value)
Deprecated.
|
RestClientBuilder |
beansRequireDefaultConstructor()
Deprecated.
|
RestClientBuilder |
beansRequireDefaultConstructor(boolean value)
Deprecated.
|
RestClientBuilder |
beansRequireSerializable()
Deprecated.
|
RestClientBuilder |
beansRequireSerializable(boolean value)
Deprecated.
|
RestClientBuilder |
beansRequireSettersForGetters()
Deprecated.
|
RestClientBuilder |
beansRequireSettersForGetters(boolean value)
Deprecated.
|
RestClientBuilder |
beansRequireSomeProperties(boolean value)
Deprecated.
|
RestClientBuilder |
binaryInputFormat(BinaryFormat value)
Deprecated.
Configuration property: Binary input format.
|
RestClientBuilder |
binaryOutputFormat(BinaryFormat value)
Deprecated.
Configuration property: Binary string format.
|
RestClientBuilder |
bpi(Class<?> beanClass,
String value)
Deprecated.
Bean property includes.
|
RestClientBuilder |
bpi(Map<String,Object> values)
Deprecated.
Bean property includes.
|
RestClientBuilder |
bpi(String beanClassName,
String value)
Deprecated.
Bean property includes.
|
RestClientBuilder |
bpro(Class<?> beanClass,
String value)
Deprecated.
Read-only bean properties.
|
RestClientBuilder |
bpro(Map<String,Object> values)
Deprecated.
Read-only bean properties.
|
RestClientBuilder |
bpro(String beanClassName,
String value)
Deprecated.
Read-only bean properties.
|
RestClientBuilder |
bpwo(Class<?> beanClass,
String properties)
Deprecated.
Write-only bean properties.
|
RestClientBuilder |
bpwo(Map<String,Object> values)
Deprecated.
Write-only bean properties.
|
RestClientBuilder |
bpwo(String beanClassName,
String value)
Deprecated.
Write-only bean properties.
|
RestClientBuilder |
bpx(Class<?> beanClass,
String properties)
Deprecated.
Bean property excludes.
|
RestClientBuilder |
bpx(Map<String,Object> values)
Deprecated.
Bean property excludes.
|
RestClientBuilder |
bpx(String beanClassName,
String value)
Deprecated.
Bean property excludes.
|
RestClient |
build()
Deprecated.
Build the object.
|
RestClientBuilder |
cacheControl(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
callHandler(Class<? extends RestCallHandler> value)
Deprecated.
Configuration property: REST call handler.
|
RestClientBuilder |
callHandler(RestCallHandler value)
Deprecated.
Configuration property: REST call handler.
|
RestClientBuilder |
cipherSuites(String... cipherSuites)
Deprecated.
|
RestClientBuilder |
clientVersion(String version)
Deprecated.
Sets the client version by setting the value for the
|
RestClientBuilder |
connection(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
connectionBackoffStrategy(ConnectionBackoffStrategy connectionBackoffStrategy)
Deprecated.
|
RestClientBuilder |
connectionManager(HttpClientConnectionManager connManager)
Deprecated.
|
RestClientBuilder |
connectionManagerShared(boolean shared)
Deprecated.
|
RestClientBuilder |
connectionReuseStrategy(ConnectionReuseStrategy reuseStrategy)
Deprecated.
|
RestClientBuilder |
connectionTimeToLive(long connTimeToLive,
TimeUnit connTimeToLiveTimeUnit)
Deprecated.
|
RestClientBuilder |
contentDecoderRegistry(Map<String,InputStreamFactory> contentDecoderMap)
Deprecated.
|
RestClientBuilder |
contentLength(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
contentType(Object value)
Deprecated.
Sets the value for the
|
protected HttpClientConnectionManager |
createConnectionManager()
Deprecated.
|
protected CloseableHttpClient |
createHttpClient()
Deprecated.
Creates an instance of an
HttpClient to be used to handle all HTTP communications with the target server. |
protected HttpClientBuilder |
createHttpClientBuilder()
Deprecated.
Creates an instance of an
HttpClientBuilder to be used to create the HttpClient . |
RestClientBuilder |
date(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
debug()
Deprecated.
|
RestClientBuilder |
debug(boolean value)
Deprecated.
|
RestClientBuilder |
debugOutputLines(int value)
Deprecated.
Configuration property: Debug output lines.
|
RestClientBuilder |
defaultAuthSchemeRegistry(Lookup<AuthSchemeProvider> authSchemeRegistry)
Deprecated.
|
RestClientBuilder |
defaultConnectionConfig(ConnectionConfig config)
Deprecated.
|
RestClientBuilder |
defaultCookieSpecRegistry(Lookup<CookieSpecProvider> cookieSpecRegistry)
Deprecated.
|
RestClientBuilder |
defaultCookieStore(CookieStore cookieStore)
Deprecated.
|
RestClientBuilder |
defaultCredentialsProvider(CredentialsProvider credentialsProvider)
Deprecated.
|
RestClientBuilder |
defaultHeaders(Collection<? extends Header> defaultHeaders)
Deprecated.
|
RestClientBuilder |
defaultRequestConfig(RequestConfig config)
Deprecated.
|
RestClientBuilder |
defaultSocketConfig(SocketConfig config)
Deprecated.
|
RestClientBuilder |
detectRecursions()
Deprecated.
Configuration property: Automatically detect POJO recursions.
|
RestClientBuilder |
detectRecursions(boolean value)
Deprecated.
Configuration property: Automatically detect POJO recursions.
|
RestClientBuilder |
dictionary(Object... values)
Deprecated.
|
RestClientBuilder |
disableAuthCaching()
Deprecated.
|
RestClientBuilder |
disableAutomaticRetries()
Deprecated.
|
RestClientBuilder |
disableConnectionState()
Deprecated.
|
RestClientBuilder |
disableContentCompression()
Deprecated.
|
RestClientBuilder |
disableCookieManagement()
Deprecated.
|
RestClientBuilder |
disableRedirectHandling()
Deprecated.
|
RestClientBuilder |
enableLaxSSL()
Deprecated.
|
RestClientBuilder |
enableSSL()
Deprecated.
|
RestClientBuilder |
evictExpiredConnections()
Deprecated.
|
RestClientBuilder |
evictIdleConnections(long maxIdleTime,
TimeUnit maxIdleTimeUnit)
Deprecated.
|
<T> RestClientBuilder |
example(Class<T> c,
T o)
Deprecated.
|
<T> RestClientBuilder |
exampleJson(Class<T> c,
String value)
Deprecated.
|
RestClientBuilder |
executorService(ExecutorService executorService,
boolean shutdownOnClose)
Deprecated.
Configuration property: Executor service.
|
RestClientBuilder |
expect(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
fileCharset(String value)
Deprecated.
Configuration property: File charset.
|
RestClientBuilder |
forwarded(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
from(Object value)
Deprecated.
Sets the value for the
|
CloseableHttpClient |
getHttpClient()
Deprecated.
Returns the
HttpClient to be used to handle all HTTP communications with the target server. |
HttpClientBuilder |
getHttpClientBuilder()
Deprecated.
|
RestClientBuilder |
header(String key,
Object value)
Deprecated.
Configuration property: Request headers.
|
RestClientBuilder |
headers(Map<String,Object> headers)
Deprecated.
Sets arbitrary request headers.
|
RestClientBuilder |
host(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
hostnameVerifier(HostnameVerifier hostnameVerifier)
Deprecated.
|
RestClientBuilder |
html()
Deprecated.
Convenience method for specifying HTML as the transmission media type.
|
RestClientBuilder |
httpClient(CloseableHttpClient value)
Deprecated.
Sets the
HttpClient to be used to handle all HTTP communications with the target server. |
RestClientBuilder |
httpClient(CloseableHttpClient httpClient,
boolean keepHttpClientOpen)
Deprecated.
|
RestClientBuilder |
httpClientBuilder(HttpClientBuilder value)
Deprecated.
|
RestClientBuilder |
httpClientConnectionManager(HttpClientConnectionManager httpClientConnectionManager)
Deprecated.
Sets the internal
HttpClientConnectionManager . |
RestClientBuilder |
httpProcessor(HttpProcessor httpprocessor)
Deprecated.
|
RestClientBuilder |
ifMatch(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
ifModifiedSince(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
ifNoneMatch(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
ifRange(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
ifUnmodifiedSince(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
ignoreInvocationExceptionsOnGetters()
Deprecated.
|
RestClientBuilder |
ignoreInvocationExceptionsOnGetters(boolean value)
Deprecated.
|
RestClientBuilder |
ignoreInvocationExceptionsOnSetters()
Deprecated.
|
RestClientBuilder |
ignoreInvocationExceptionsOnSetters(boolean value)
Deprecated.
|
RestClientBuilder |
ignorePropertiesWithoutSetters(boolean value)
Deprecated.
|
RestClientBuilder |
ignoreRecursions()
Deprecated.
Configuration property: Ignore recursion errors.
|
RestClientBuilder |
ignoreRecursions(boolean value)
Deprecated.
Configuration property: Ignore recursion errors.
|
RestClientBuilder |
ignoreUnknownBeanProperties()
Deprecated.
|
RestClientBuilder |
ignoreUnknownBeanProperties(boolean value)
Deprecated.
|
RestClientBuilder |
ignoreUnknownNullBeanProperties(boolean value)
Deprecated.
|
RestClientBuilder |
implClass(Class<?> interfaceClass,
Class<?> implClass)
Deprecated.
|
RestClientBuilder |
implClasses(Map<Class<?>,Class<?>> values)
Deprecated.
|
RestClientBuilder |
initialDepth(int value)
Deprecated.
Configuration property: Initial depth.
|
RestClientBuilder |
inputStreamCharset(String value)
Deprecated.
Configuration property: Input stream charset.
|
RestClientBuilder |
interceptors(RestCallInterceptor... value)
Deprecated.
Configuration property: Call interceptors.
|
RestClientBuilder |
json()
Deprecated.
Convenience method for specifying JSON as the transmission media type.
|
RestClientBuilder |
keepAliveStrategy(ConnectionKeepAliveStrategy keepAliveStrategy)
Deprecated.
|
RestClientBuilder |
keepHttpClientOpen()
Deprecated.
Configuration property: Keep HttpClient open.
|
RestClientBuilder |
keepHttpClientOpen(boolean value)
Deprecated.
Configuration property: Keep HttpClient open.
|
RestClientBuilder |
keyManagers(KeyManager... keyManagers)
Deprecated.
|
RestClientBuilder |
listenerP(Class<? extends ParserListener> value)
Deprecated.
Configuration property: Parser listener.
|
RestClientBuilder |
listenerS(Class<? extends SerializerListener> value)
Deprecated.
Configuration property: Serializer listener.
|
RestClientBuilder |
locale(Locale value)
Deprecated.
|
RestClientBuilder |
logTo(Level level,
Logger log)
Deprecated.
Adds a
RestCallLogger to the list of interceptors on this class. |
RestClientBuilder |
marshall(Marshall value)
Deprecated.
Configuration property: Marshall
|
RestClientBuilder |
maxConnPerRoute(int maxConnPerRoute)
Deprecated.
|
RestClientBuilder |
maxConnTotal(int maxConnTotal)
Deprecated.
|
RestClientBuilder |
maxDepth(int value)
Deprecated.
Configuration property: Max serialization depth.
|
RestClientBuilder |
maxForwards(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
maxIndent(int value)
Deprecated.
Configuration property: Maximum indentation.
|
RestClientBuilder |
mediaType(MediaType value)
Deprecated.
|
RestClientBuilder |
msgpack()
Deprecated.
Convenience method for specifying MessagePack as the transmission media type.
|
RestClientBuilder |
notBeanClasses(Object... values)
Deprecated.
|
RestClientBuilder |
notBeanPackages(Object... values)
Deprecated.
|
RestClientBuilder |
noTrace()
Deprecated.
When called,
|
RestClientBuilder |
openapi()
Deprecated.
Convenience method for specifying URL-Encoding as the transmission media type.
|
RestClientBuilder |
origin(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
paramFormat(String value)
Deprecated.
Configuration property: Parameter format.
|
RestClientBuilder |
paramFormatPlain()
Deprecated.
Configuration property: Parameter format.
|
RestClientBuilder |
parser(Class<? extends Parser> value)
Deprecated.
Configuration property: Parser.
|
RestClientBuilder |
parser(Parser value)
Deprecated.
Configuration property: Parser.
|
RestClientBuilder |
partParser(Class<? extends HttpPartParser> value)
Deprecated.
Configuration property: Part parser.
|
RestClientBuilder |
partParser(HttpPartParser value)
Deprecated.
Configuration property: Part parser.
|
RestClientBuilder |
partSerializer(Class<? extends HttpPartSerializer> value)
Deprecated.
Configuration property: Part serializer.
|
RestClientBuilder |
partSerializer(HttpPartSerializer value)
Deprecated.
Configuration property: Part serializer.
|
RestClientBuilder |
plainText()
Deprecated.
Convenience method for specifying plain-text as the transmission media type.
|
RestClientBuilder |
pooled()
Deprecated.
|
RestClientBuilder |
pragma(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
prependTo(String name,
Object value)
Deprecated.
Adds a free-form value to the beginning of a LIST property.
|
RestClientBuilder |
proxy(HttpHost proxy)
Deprecated.
|
RestClientBuilder |
proxyAuthenticationStrategy(AuthenticationStrategy proxyAuthStrategy)
Deprecated.
|
RestClientBuilder |
proxyAuthorization(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
publicSuffixMatcher(PublicSuffixMatcher publicSuffixMatcher)
Deprecated.
|
RestClientBuilder |
putTo(String name,
String key,
Object value)
Deprecated.
Adds or overwrites a free-form entry in a MAP property.
|
RestClientBuilder |
query(String key,
Object value)
Deprecated.
Configuration property: Request query parameters.
|
RestClientBuilder |
quoteChar(char value)
Deprecated.
Configuration property: Quote character.
|
RestClientBuilder |
range(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
redirectStrategy(RedirectStrategy redirectStrategy)
Deprecated.
|
RestClientBuilder |
referer(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
removeFrom(String name,
Object value)
Deprecated.
Removes a free-form value from a SET, LIST, or MAP property.
|
RestClientBuilder |
requestExecutor(HttpRequestExecutor requestExec)
Deprecated.
|
RestClientBuilder |
retryable(int retries,
int interval,
RetryOn retryOn)
Deprecated.
Make HTTP calls retryable if an error response (>=400) is received.
|
RestClientBuilder |
retryHandler(HttpRequestRetryHandler retryHandler)
Deprecated.
|
RestClientBuilder |
rootUrl(Object value)
Deprecated.
Configuration property: Root URI.
|
RestClientBuilder |
routePlanner(HttpRoutePlanner routePlanner)
Deprecated.
|
RestClientBuilder |
schemePortResolver(SchemePortResolver schemePortResolver)
Deprecated.
|
RestClientBuilder |
secureRandom(SecureRandom secureRandom)
Deprecated.
|
RestClientBuilder |
serializer(Class<? extends Serializer> value)
Deprecated.
Configuration property: Serializer.
|
RestClientBuilder |
serializer(Serializer value)
Deprecated.
Configuration property: Serializer.
|
RestClientBuilder |
serviceUnavailableRetryStrategy(ServiceUnavailableRetryStrategy serviceUnavailStrategy)
Deprecated.
|
RestClientBuilder |
set(Map<String,Object> properties)
Deprecated.
Sets multiple free-form configuration properties on this object replacing all previous values.
|
RestClientBuilder |
set(String name,
Object value)
Deprecated.
Sets a free-form configuration property on this object.
|
RestClientBuilder |
simpleJson()
Deprecated.
Convenience method for specifying Simple JSON as the transmission media type.
|
RestClientBuilder |
sortCollections()
Deprecated.
Configuration property: Sort arrays and collections alphabetically.
|
RestClientBuilder |
sortCollections(boolean value)
Deprecated.
Configuration property: Sort arrays and collections alphabetically.
|
RestClientBuilder |
sortMaps()
Deprecated.
Configuration property: Sort maps alphabetically.
|
RestClientBuilder |
sortMaps(boolean value)
Deprecated.
Sets the
Serializer.SERIALIZER_sortMaps property on all serializers in this group. |
RestClientBuilder |
sortProperties()
Deprecated.
|
RestClientBuilder |
sortProperties(boolean value)
Deprecated.
|
RestClientBuilder |
sq()
Deprecated.
Configuration property: Quote character.
|
RestClientBuilder |
sslContext(SSLContext sslContext)
Deprecated.
|
RestClientBuilder |
sslHostnameVerifier(HostnameVerifier hostnameVerifier)
Deprecated.
|
RestClientBuilder |
sslProtocols(String... sslProtocols)
Deprecated.
|
RestClientBuilder |
sslSocketFactory(LayeredConnectionSocketFactory sslSocketFactory)
Deprecated.
|
RestClientBuilder |
strict()
Deprecated.
Configuration property: Strict mode.
|
RestClientBuilder |
strict(boolean value)
Deprecated.
Configuration property: Strict mode.
|
RestClientBuilder |
targetAuthenticationStrategy(AuthenticationStrategy targetAuthStrategy)
Deprecated.
|
RestClientBuilder |
te(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
timeZone(TimeZone value)
Deprecated.
|
RestClientBuilder |
trimEmptyCollections()
Deprecated.
Configuration property: Trim empty lists and arrays.
|
RestClientBuilder |
trimEmptyCollections(boolean value)
Deprecated.
Configuration property: Trim empty lists and arrays.
|
RestClientBuilder |
trimEmptyMaps()
Deprecated.
Configuration property: Trim empty maps.
|
RestClientBuilder |
trimEmptyMaps(boolean value)
Deprecated.
Configuration property: Trim empty maps.
|
RestClientBuilder |
trimNullProperties(boolean value)
Deprecated.
Configuration property: Trim null bean property values.
|
RestClientBuilder |
trimStringsP()
Deprecated.
Configuration property: Trim parsed strings.
|
RestClientBuilder |
trimStringsP(boolean value)
Deprecated.
Configuration property: Trim parsed strings.
|
RestClientBuilder |
trimStringsS()
Deprecated.
Configuration property: Trim strings.
|
RestClientBuilder |
trimStringsS(boolean value)
Deprecated.
Configuration property: Trim strings.
|
RestClientBuilder |
trustManagers(TrustManager... trustManagers)
Deprecated.
|
RestClientBuilder |
unbuffered()
Deprecated.
Configuration property: Unbuffered.
|
RestClientBuilder |
unbuffered(boolean value)
Deprecated.
Configuration property: Unbuffered.
|
RestClientBuilder |
uon()
Deprecated.
Convenience method for specifying UON as the transmission media type.
|
RestClientBuilder |
upgrade(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
uriContext(UriContext value)
Deprecated.
Configuration property: URI context bean.
|
RestClientBuilder |
uriRelativity(UriRelativity value)
Deprecated.
Configuration property: URI relativity.
|
RestClientBuilder |
uriResolution(UriResolution value)
Deprecated.
Configuration property: URI resolution.
|
RestClientBuilder |
urlEnc()
Deprecated.
Convenience method for specifying URL-Encoding as the transmission media type.
|
RestClientBuilder |
useEnumNames()
Deprecated.
|
RestClientBuilder |
useEnumNames(boolean value)
Deprecated.
|
RestClientBuilder |
useInterfaceProxies(boolean value)
Deprecated.
|
RestClientBuilder |
useJavaBeanIntrospector()
Deprecated.
|
RestClientBuilder |
useJavaBeanIntrospector(boolean value)
Deprecated.
|
RestClientBuilder |
userAgent(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
userAgent(String userAgent)
Deprecated.
|
RestClientBuilder |
userTokenHandler(UserTokenHandler userTokenHandler)
Deprecated.
|
RestClientBuilder |
useSystemProperties()
Deprecated.
|
RestClientBuilder |
useWhitespace()
Deprecated.
Configuration property: Use whitespace.
|
RestClientBuilder |
useWhitespace(boolean value)
Deprecated.
Configuration property: Use whitespace.
|
RestClientBuilder |
via(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
warning(Object value)
Deprecated.
Sets the value for the
|
RestClientBuilder |
ws()
Deprecated.
Configuration property: Use whitespace.
|
RestClientBuilder |
xml()
Deprecated.
Convenience method for specifying XML as the transmission media type.
|
appendTo, beanInterceptor, beansDontRequireSomeProperties, dictionaryOn, dontIgnorePropertiesWithoutSetters, dontIgnoreTransientFields, dontIgnoreUnknownNullBeanProperties, dontUseInterfaceProxies, excludeProperties, excludeProperties, excludeProperties, fluentSetters, fluentSetters, fluentSetters, ignoreTransientFields, includeProperties, includeProperties, includeProperties, interfaceClass, interfaces, pojoSwaps, pojoSwapsRemove, pojoSwapsReplace, propertyNamer, propertyNamer, putAllTo, sortProperties, stopClass, swaps, typeName, typePropertyName, typePropertyName
build, getPropertyStore, getPropertyStoreBuilder, peek, peek
protected RestClientBuilder(PropertyStore ps, 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 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 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(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 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 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(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(CloseableHttpClient httpClient, boolean keepHttpClientOpen)
HttpClient
to use for handling HTTP communications.
httpClient(CloseableHttpClient)
and keepHttpClientOpen(boolean)
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(HttpClientConnectionManager httpClientConnectionManager)
HttpClientConnectionManager
.httpClientConnectionManager
- The HTTP client connection manager.@Deprecated protected HttpClientConnectionManager createConnectionManager() throws KeyManagementException, NoSuchAlgorithmException
HttpClientConnectionManager
returned by createConnectionManager()
.
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
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()
createConnectionManager()
method will return a PoolingHttpClientConnectionManager
instead of a BasicHttpClientConnectionManager
.
getHttpClientBuilder()
and modify the client builder directly using HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
@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 callHandler(Class<? extends RestCallHandler> value)
Allows you to provide a custom handler for making HTTP calls.
value
- The new value for this setting.
public RestClientBuilder callHandler(RestCallHandler value)
Allows you to provide a custom handler for making HTTP calls.
value
- The new value for this setting.
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
@Bean
annotation can be used on a non-public bean class to override this setting.
@BeanIgnore
annotation can also be used on a public bean class to ignore it as a bean.
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.
This setting affects the logic for finding no-arg constructors for bean. Normally, only
@Beanc
annotation can also be used to expose a non-public constructor.
@BeanIgnore
annotation can also be used on a public bean constructor to ignore it.
beanConstructorVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
.@Deprecated public RestClientBuilder beanDictionary(Class<?>... values)
BeanContextBuilder
BeanContextBuilder.dictionary(Object...)
beanDictionary
in class BeanContextBuilder
@Deprecated public RestClientBuilder beanDictionary(Object... values)
BeanContextBuilder
BeanContextBuilder.dictionary(Object...)
beanDictionary
in class BeanContextBuilder
values
- The values to add to this property.@Deprecated public RestClientBuilder beanDictionaryReplace(Class<?>... values)
BeanContextBuilder
BeanContextBuilder.dictionary(Object...)
beanDictionaryReplace
in class BeanContextBuilder
@Deprecated public RestClientBuilder beanDictionaryReplace(Object... values)
BeanContextBuilder
BeanContextBuilder.dictionary(Object...)
beanDictionaryReplace
in class BeanContextBuilder
@Deprecated public RestClientBuilder beanDictionaryRemove(Class<?>... values)
BeanContextBuilder
BeanContextBuilder.dictionary(Object...)
beanDictionaryRemove
in class BeanContextBuilder
@Deprecated public RestClientBuilder beanDictionaryRemove(Object... values)
BeanContextBuilder
BeanContextBuilder.dictionary(Object...)
beanDictionaryRemove
in class BeanContextBuilder
public RestClientBuilder beanFieldVisibility(Visibility value)
BeanContextBuilder
Only look for bean fields with the specified minimum visibility.
This affects which fields on a bean class are considered bean properties. Normally only
Bean fields can be ignored as properties entirely by setting the value to Visibility.NONE
@Beanp
annotation can also be used to expose a non-public field.
@BeanIgnore
annotation can also be used on a public bean field to ignore it as a bean property.
beanFieldVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
.public RestClientBuilder beanFilters(Object... values)
BeanContextBuilder
BeanConfig.interfaces()
and other methods.
beanFilters
in class BeanContextBuilder
public RestClientBuilder beanFiltersReplace(Object... values)
BeanContextBuilder
BeanConfig.interfaces()
and other methods.
beanFiltersReplace
in class BeanContextBuilder
public RestClientBuilder beanFiltersRemove(Object... values)
BeanContextBuilder
BeanConfig.interfaces()
and other methods.
beanFiltersRemove
in class BeanContextBuilder
public RestClientBuilder beanMapPutReturnsOldValue(boolean value)
BeanContextBuilder
BeanContextBuilder.beanMapPutReturnsOldValue()
beanMapPutReturnsOldValue
in class BeanContextBuilder
public RestClientBuilder beanMapPutReturnsOldValue()
BeanContextBuilder
When enabled, then the BeanMap.put()
method will return old property
values. Otherwise, it returns
Disabled by default because it introduces a slight performance penalty during serialization.
beanMapPutReturnsOldValue
in class BeanContextBuilder
public RestClientBuilder beanMethodVisibility(Visibility value)
BeanContextBuilder
Only look for bean methods with the specified minimum visibility.
This affects which methods are detected as getters and setters on a bean class. Normally only
@Beanp
annotation can also be used to expose a non-public method.
@BeanIgnore
annotation can also be used on a public bean getter/setter to ignore it as a bean property.
beanMethodVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
public RestClientBuilder beansRequireDefaultConstructor(boolean value)
BeanContextBuilder
BeanContextBuilder.beansRequireDefaultConstructor()
beansRequireDefaultConstructor
in class BeanContextBuilder
public RestClientBuilder beansRequireDefaultConstructor()
BeanContextBuilder
When enabled, a Java class must implement a default no-arg constructor to be considered a bean.
Otherwise, the bean will be serialized as a string using the Object.toString()
method.
@Bean
annotation can be used on a bean class to override this setting.
@BeanIgnore
annotation can also be used on a class to ignore it as a bean.
beansRequireDefaultConstructor
in class BeanContextBuilder
public RestClientBuilder beansRequireSerializable(boolean value)
BeanContextBuilder
BeanContextBuilder.beansRequireSerializable()
beansRequireSerializable
in class BeanContextBuilder
public RestClientBuilder beansRequireSerializable()
BeanContextBuilder
When enabled, a Java class must implement the Serializable
interface to be considered a bean.
Otherwise, the bean will be serialized as a string using the Object.toString()
method.
@Bean
annotation can be used on a bean class to override this setting.
@BeanIgnore
annotation can also be used on a class to ignore it as a bean.
beansRequireSerializable
in class BeanContextBuilder
public RestClientBuilder beansRequireSettersForGetters(boolean value)
BeanContextBuilder
BeanContextBuilder.beansRequireSettersForGetters()
beansRequireSettersForGetters
in class BeanContextBuilder
public RestClientBuilder beansRequireSettersForGetters()
BeanContextBuilder
When enabled, ignore read-only properties (properties with getters but not setters).
@Beanp
annotation can be used on the getter to override this setting.
@BeanIgnore
annotation can also be used on getters to ignore them as bean properties.
beansRequireSettersForGetters
in class BeanContextBuilder
public RestClientBuilder beansRequireSomeProperties(boolean value)
BeanContextBuilder
BeanContextBuilder.beansDontRequireSomeProperties()
beansRequireSomeProperties
in class BeanContextBuilder
public RestClientBuilder bpi(Class<?> beanClass, String value)
BeanContextBuilder
Specifies the set and order of names of properties associated with the bean class.
For example, BeanContextBuilder.ignoreUnknownBeanProperties()
has been called.
This value is entirely optional if you simply want to expose all the getters and public fields on a class as bean properties. However, it's useful if you want certain getters to be ignored or you want the properties to be serialized in a particular order. Note that on IBM JREs, the property order is the same as the order in the source code, whereas on Oracle JREs, the order is entirely random.
Setting applies to specified class and all subclasses.
This method is functionally equivalent to the following code:
builder.annotations(
Bean.bpi()
- On an annotation on the bean class itself.
BeanConfig.bpi()
- On a bean config annotation (see BeanContextBuilder.annotations(Annotation...)
).
bpi
in class BeanContextBuilder
beanClass
- The bean class.value
- Comma-delimited list of property names.public RestClientBuilder bpi(Map<String,Object> values)
BeanContextBuilder
Specifies the set and order of names of properties associated with bean classes.
For example, BeanContextBuilder.ignoreUnknownBeanProperties()
has been called.
This value is entirely optional if you simply want to expose all the getters and public fields on a class as bean properties. However, it's useful if you want certain getters to be ignored or you want the properties to be serialized in a particular order. Note that on IBM JREs, the property order is the same as the order in the source code, whereas on Oracle JREs, the order is entirely random.
Setting applies to specified class and all subclasses.
This method is functionally equivalent to the following code for each entry:
builder.annotations(
Bean.bpi()
- On an annotation on the bean class itself.
BeanConfig.bpi()
- On a bean config annotation (see BeanContextBuilder.annotations(Annotation...)
).
bpi
in class BeanContextBuilder
values
- The values to add to this builder.
public RestClientBuilder bpi(String beanClassName, String value)
BeanContextBuilder
Specifies the set and order of names of properties associated with the bean class.
For example, BeanContextBuilder.ignoreUnknownBeanProperties()
has been called.
This value is entirely optional if you simply want to expose all the getters and public fields on a class as bean properties. However, it's useful if you want certain getters to be ignored or you want the properties to be serialized in a particular order. Note that on IBM JREs, the property order is the same as the order in the source code, whereas on Oracle JREs, the order is entirely random.
Setting applies to specified class and all subclasses.
This method is functionally equivalent to the following code:
builder.annotations(
Bean.bpi()
- On an annotation on the bean class itself.
BeanConfig.bpi()
- On a bean config annotation (see BeanContextBuilder.annotations(Annotation...)
).
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.
Same as BeanContextBuilder.bpi(Class, String)
except you specify a list of bean property names that you want to exclude from
serialization.
Setting applies to specified class and all subclasses.
This method is functionally equivalent to the following code:
builder.annotations(
bpx
in class BeanContextBuilder
beanClass
- The bean class.properties
- Comma-delimited list of property names.public RestClientBuilder bpx(Map<String,Object> values)
BeanContextBuilder
Specifies to exclude the specified list of properties for the specified bean classes.
Same as BeanContextBuilder.bpi(Map)
except you specify a list of bean property names that you want to exclude from
serialization.
Setting applies to specified class and all subclasses.
This method is functionally equivalent to the following code for each entry:
builder.annotations(
bpx
in class BeanContextBuilder
values
- The values to add to this builder.
public RestClientBuilder bpx(String beanClassName, String value)
BeanContextBuilder
Specifies to exclude the specified list of properties for the specified bean class.
Same as BeanContextBuilder.bpx(String, String)
except you specify a list of bean property names that you want to exclude from
serialization.
Setting applies to specified class and all subclasses.
This method is functionally equivalent to the following code:
builder.annotations(
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 one or more properties on a bean that are read-only despite having valid getters.
Serializers will serialize such properties as usual, but parsers will silently ignore them.
Note that this is different from the
This method is functionally equivalent to the following code:
builder.annotations(
bpro
in class BeanContextBuilder
beanClass
- The bean class.value
- Comma-delimited list of property names.public RestClientBuilder bpro(Map<String,Object> values)
BeanContextBuilder
Specifies one or more properties on beans that are read-only despite having valid getters.
Serializers will serialize such properties as usual, but parsers will silently ignore them.
Note that this is different from the
This method is functionally equivalent to the following code for each entry:
builder.annotations(
bpro
in class BeanContextBuilder
values
- The values to add to this builder.
public RestClientBuilder bpro(String beanClassName, String value)
BeanContextBuilder
Specifies one or more properties on a bean that are read-only despite having valid getters.
Serializers will serialize such properties as usual, but parsers will silently ignore them.
Note that this is different from the
This method is functionally equivalent to the following code:
builder.annotations(
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 one or more properties on a bean that are write-only despite having valid setters.
Parsers will parse such properties as usual, but serializers will silently ignore them.
Note that this is different from the
This method is functionally equivalent to the following code:
builder.annotations(
bpwo
in class BeanContextBuilder
beanClass
- The bean class.properties
- Comma-delimited list of property names.public RestClientBuilder bpwo(Map<String,Object> values)
BeanContextBuilder
Specifies one or more properties on a bean that are write-only despite having valid setters.
Parsers will parse such properties as usual, but serializers will silently ignore them.
Note that this is different from the
This method is functionally equivalent to the following code for each entry:
builder.annotations(
bpwo
in class BeanContextBuilder
values
- The values to add to this builder.
public RestClientBuilder bpwo(String beanClassName, String value)
BeanContextBuilder
Specifies one or more properties on a bean that are write-only despite having valid setters.
Parsers will parse such properties as usual, but serializers will silently ignore them.
Note that this is different from the
This method is functionally equivalent to the following code:
builder.annotations(
bpwo
in class BeanContextBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public RestClientBuilder debug()
ContextBuilder
Enables the following additional information during serialization:
BeanTraverseContext.BEANTRAVERSE_detectRecursions
.
Enables the following additional information during parsing:
debug
in class BeanContextBuilder
public RestClientBuilder debug(boolean value)
BeanContextBuilder
BeanContextBuilder.debug()
debug
in class BeanContextBuilder
public RestClientBuilder dictionary(Object... values)
BeanContextBuilder
The list of classes that make up the bean dictionary in this bean context.
A dictionary is a name/class mapping used to find class types during parsing when they cannot be inferred
through reflection. The names are defined through the @Bean(typeName)
annotation defined
on the bean class. For example, if a class
This setting tells the parsers which classes to look for when resolving
Values can consist of any of the following types:
@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.
Another option is to use the Bean.dictionary()
annotation on the POJO class itself:
A typical usage is to allow for HTML documents to be parsed back into HTML beans:
dictionary
in class BeanContextBuilder
values
- The values to add to this property.public <T> RestClientBuilder example(Class<T> c, T o)
BeanContextBuilder
Specifies an example of the specified class.
Examples are used in cases such as POJO examples in Swagger documents.
Setting applies to specified class and all subclasses.
POJO examples can also be defined on classes via the following:
@Example
.
@Example
with zero arguments or one BeanSession
argument.
BeanSession
argument.
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 in JSON of the specified class.
Examples are used in cases such as POJO examples in Swagger documents.
Setting applies to specified class and all subclasses.
POJO examples can also be defined on classes via the following:
@Example
.
@Example
with zero arguments or one BeanSession
argument.
BeanSession
argument.
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
BeanContextBuilder.ignoreInvocationExceptionsOnGetters()
ignoreInvocationExceptionsOnGetters
in class BeanContextBuilder
public RestClientBuilder ignoreInvocationExceptionsOnGetters()
BeanContextBuilder
When enabled, errors thrown when calling bean getter methods will silently be ignored.
Otherwise, a BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnGetters
in class BeanContextBuilder
public RestClientBuilder ignoreInvocationExceptionsOnSetters(boolean value)
BeanContextBuilder
BeanContextBuilder.ignoreInvocationExceptionsOnSetters()
ignoreInvocationExceptionsOnSetters
in class BeanContextBuilder
public RestClientBuilder ignoreInvocationExceptionsOnSetters()
BeanContextBuilder
When enabled, errors thrown when calling bean setter methods will silently be ignored.
Otherwise, a BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnSetters
in class BeanContextBuilder
public RestClientBuilder ignorePropertiesWithoutSetters(boolean value)
BeanContextBuilder
BeanContextBuilder.dontIgnorePropertiesWithoutSetters()
ignorePropertiesWithoutSetters
in class BeanContextBuilder
public RestClientBuilder ignoreUnknownBeanProperties(boolean value)
BeanContextBuilder
BeanContextBuilder.ignoreUnknownBeanProperties()
ignoreUnknownBeanProperties
in class BeanContextBuilder
public RestClientBuilder ignoreUnknownBeanProperties()
BeanContextBuilder
When enabled, trying to set a value on a non-existent bean property will silently be ignored.
Otherwise, a BeanRuntimeException
is thrown.
ignoreUnknownBeanProperties
in class BeanContextBuilder
public RestClientBuilder ignoreUnknownNullBeanProperties(boolean value)
BeanContextBuilder
BeanContextBuilder.dontIgnoreUnknownNullBeanProperties()
ignoreUnknownNullBeanProperties
in class BeanContextBuilder
public RestClientBuilder implClass(Class<?> interfaceClass, Class<?> implClass)
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).
implClass
in class BeanContextBuilder
interfaceClass
- The interface class.implClass
- The implementation class.public RestClientBuilder implClasses(Map<Class<?>,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)
ContextBuilder
Specifies the default locale for serializer and parser sessions when not specified via SessionArgs.locale(Locale)
.
Typically used for POJO swaps that need to deal with locales such as swaps that convert PojoSwap.swap(BeanSession, Object)
and
PojoSwap.unswap(BeanSession, Object, ClassMeta, String)
methods.
locale
in class BeanContextBuilder
value
- The new value for this property.public RestClientBuilder mediaType(MediaType value)
ContextBuilder
Specifies the default media type for serializer and parser sessions when not specified via SessionArgs.mediaType(MediaType)
.
Typically used for POJO swaps that need to serialize the same POJO classes differently depending on
the specific requested media type. For example, a swap could handle a request for media types
mediaType
in class BeanContextBuilder
value
- The new value for 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
Values can consist of any of the following types:
@BeanIgnore
annotation can also be used on classes to prevent them from being recognized as beans.
notBeanClasses
in class BeanContextBuilder
values
- The values to add to this property.
public RestClientBuilder notBeanPackages(Object... values)
BeanContextBuilder
Used as a convenient way of defining the BeanContextBuilder.notBeanClasses(Object...)
property for entire packages.
Any classes within these packages will be serialized to strings using Object.toString()
.
Note that you can specify suffix patterns to include all subpackages.
Values can consist of any of the following types:
notBeanPackages
in class BeanContextBuilder
values
- The values to add to this property.
Package
objects.
public RestClientBuilder sortProperties(boolean value)
BeanContextBuilder
BeanContextBuilder.sortProperties()
sortProperties
in class BeanContextBuilder
public RestClientBuilder sortProperties()
BeanContextBuilder
When enabled, all bean properties will be serialized and access in alphabetical order. Otherwise, the natural order of the bean properties is used which is dependent on the JVM vendor. On IBM JVMs, the bean properties are ordered based on their ordering in the Java file. On Oracle JVMs, the bean properties are not ordered (which follows the official JVM specs).
This property is disabled by default so that IBM JVM users don't have to use @Bean
annotations
to force bean properties to be in a particular order and can just alter the order of the fields/methods
in the Java file.
@Bean.sort()
annotation can also be used to sort properties on just a single class.
sortProperties
in class BeanContextBuilder
public RestClientBuilder timeZone(TimeZone value)
ContextBuilder
Specifies the default time zone for serializer and parser sessions when not specified via SessionArgs.timeZone(TimeZone)
.
Typically used for POJO swaps that need to deal with timezones such as swaps that convert PojoSwap.swap(BeanSession, Object)
and
PojoSwap.unswap(BeanSession, Object, ClassMeta, String)
methods.
timeZone
in class BeanContextBuilder
value
- The new value for this property.public RestClientBuilder useEnumNames(boolean value)
BeanContextBuilder
BeanContextBuilder.useEnumNames()
useEnumNames
in class BeanContextBuilder
public RestClientBuilder useEnumNames()
BeanContextBuilder
When enabled, enums are always serialized by name, not using Object.toString()
.
useEnumNames
in class BeanContextBuilder
public RestClientBuilder useInterfaceProxies(boolean value)
BeanContextBuilder
BeanContextBuilder.dontUseInterfaceProxies()
useInterfaceProxies
in class BeanContextBuilder
public RestClientBuilder useJavaBeanIntrospector(boolean value)
BeanContextBuilder
BeanContextBuilder.useJavaBeanIntrospector()
useJavaBeanIntrospector
in class BeanContextBuilder
public RestClientBuilder useJavaBeanIntrospector()
BeanContextBuilder
Using the built-in Java bean introspector will not pick up fields or non-standard getters/setters.
Most @Bean
annotations will be ignored.
useJavaBeanIntrospector
in class BeanContextBuilder
public RestClientBuilder annotations(Annotation... values)
BeanContextBuilder
Defines annotations to apply to specific classes and methods.
Allows you to dynamically apply Juneau annotations typically applied directly to classes and methods. Useful in cases where you want to use the functionality of the annotation on beans and bean properties but do not have access to the code to do so.
As a rule, any Juneau annotation with an
The following example shows the equivalent methods for applying the @Bean
annotation:
In general, the underlying framework uses this method when it finds dynamically applied annotations on config annotations. However, concrete implementations of annotations are also provided that can be passed directly into builder classes like so:
The following is the list of concrete annotations provided that can be constructed and passed into the builder class:
BeanAnnotation
BeancAnnotation
BeanIgnoreAnnotation
BeanpAnnotation
ExampleAnnotation
NamePropertyAnnotation
ParentPropertyAnnotation
SwapAnnotation
UriAnnotation
CsvAnnotation
HtmlAnnotation
JsoAnnotation
JsonAnnotation
SchemaAnnotation
MsgPackAnnotation
OpenApiAnnotation
PlainTextAnnotation
SoapXmlAnnotation
UonAnnotation
UrlEncodingAnnotation
XmlAnnotation
The syntax for the
annotations
in class BeanContextBuilder
values
- The values to add to this property.public RestClientBuilder set(String name, Object value)
ContextBuilder
Provides the ability to specify configuration property values in a generic fashion.
Property names must have the following format that identify their datatype...
...where the parts consist of the following...
For example,
Property values get 'normalized' when they get set.
For example, calling PropertyStore
class to be comparable
and useful in determining whether a cached instance of a context object can be returned.
As a general rule, builders don't typically have "unsetter" methods. For example, once you've set strict
mode on the
set
in class BeanContextBuilder
name
- The property name.value
- The property value.
public RestClientBuilder set(Map<String,Object> properties)
ContextBuilder
Identical in function to ContextBuilder.set(String, Object)
but allows you to specify multiple values at once.
set
in class BeanContextBuilder
properties
- The properties to set on this class.
public RestClientBuilder add(Map<String,Object> properties)
ContextBuilder
Identical in function to ContextBuilder.set(String, Object)
but allows you to specify multiple values at once.
add
in class BeanContextBuilder
properties
- The properties to set on this class.
public RestClientBuilder addTo(String name, Object value)
ContextBuilder
SET properties are those properties with one of the following type parts:
For example, the BeanContext.BEAN_notBeanClasses
property which has the value
addTo
in class BeanContextBuilder
name
- The property name.value
- The new value to add to the SET property.
public RestClientBuilder prependTo(String name, Object value)
ContextBuilder
LIST properties are those properties with one of the following type parts:
For example, the BeanContext.BEAN_swaps
property which has the value
prependTo
in class BeanContextBuilder
name
- The property name.value
- The new value to add to the LIST property.
public RestClientBuilder putTo(String name, String key, Object value)
ContextBuilder
MAP properties are those properties with one of the following type parts:
For example, the BeanContext.BEAN_implClasses
property which has the value
putTo
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/LIST/MAP property.public RestClientBuilder apply(PropertyStore copyFrom)
ContextBuilder
apply
in class BeanContextBuilder
copyFrom
- The property store whose settings are being copied.public RestClientBuilder applyAnnotations(AnnotationList al, VarResolverSession vrs)
ContextBuilder
The AnnotationList
object is an ordered list of annotations and the classes/methods/packages they were found on.
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<?>... fromClasses)
ContextBuilder
Any annotations found that themselves are annotated with PropertyStoreApply
will be resolved and
applied as properties to this builder. These annotations include:
BeanConfig
CsvConfig
HtmlConfig
HtmlDocConfig
JsoConfig
JsonConfig
JsonSchemaConfig
MsgPackConfig
OpenApiConfig
ParserConfig
PlainTextConfig
SerializerConfig
SoapXmlConfig
UonConfig
UrlEncodingConfig
XmlConfig
Annotations on classes are appended in the following order:
The default var resolver VarResolver.DEFAULT
is used to resolve any variables in annotation field values.
applyAnnotations
in class BeanContextBuilder
fromClasses
- The classes on which the annotations are defined.public RestClientBuilder applyAnnotations(Method... fromMethods)
ContextBuilder
Any annotations found that themselves are annotated with PropertyStoreApply
will be resolved and
applied as properties to this builder. These annotations include:
BeanConfig
CsvConfig
HtmlConfig
HtmlDocConfig
JsoConfig
JsonConfig
JsonSchemaConfig
MsgPackConfig
OpenApiConfig
ParserConfig
PlainTextConfig
SerializerConfig
SoapXmlConfig
UonConfig
UrlEncodingConfig
XmlConfig
Annotations on methods are appended in the following order:
The default var resolver VarResolver.DEFAULT
is used to resolve any variables in annotation field values.
applyAnnotations
in class BeanContextBuilder
fromMethods
- The methods on which the annotations are defined.public RestClientBuilder disableRedirectHandling()
HttpClientBuilder.disableRedirectHandling()
public RestClientBuilder redirectStrategy(RedirectStrategy redirectStrategy)
redirectStrategy
- New property value.HttpClientBuilder.setRedirectStrategy(RedirectStrategy)
public RestClientBuilder defaultCookieSpecRegistry(Lookup<CookieSpecProvider> cookieSpecRegistry)
cookieSpecRegistry
- New property value.HttpClientBuilder.setDefaultCookieSpecRegistry(Lookup)
public RestClientBuilder requestExecutor(HttpRequestExecutor requestExec)
requestExec
- New property value.HttpClientBuilder.setRequestExecutor(HttpRequestExecutor)
public RestClientBuilder sslHostnameVerifier(HostnameVerifier hostnameVerifier)
hostnameVerifier
- New property value.HttpClientBuilder.setSSLHostnameVerifier(HostnameVerifier)
public RestClientBuilder publicSuffixMatcher(PublicSuffixMatcher publicSuffixMatcher)
publicSuffixMatcher
- New property value.HttpClientBuilder.setPublicSuffixMatcher(PublicSuffixMatcher)
public RestClientBuilder sslContext(SSLContext sslContext)
sslContext
- New property value.HttpClientBuilder.setSSLContext(SSLContext)
public RestClientBuilder sslSocketFactory(LayeredConnectionSocketFactory sslSocketFactory)
sslSocketFactory
- New property value.HttpClientBuilder.setSSLSocketFactory(LayeredConnectionSocketFactory)
public RestClientBuilder maxConnTotal(int maxConnTotal)
maxConnTotal
- New property value.HttpClientBuilder.setMaxConnTotal(int)
public RestClientBuilder maxConnPerRoute(int maxConnPerRoute)
maxConnPerRoute
- New property value.HttpClientBuilder.setMaxConnPerRoute(int)
public RestClientBuilder defaultSocketConfig(SocketConfig config)
config
- New property value.HttpClientBuilder.setDefaultSocketConfig(SocketConfig)
public RestClientBuilder defaultConnectionConfig(ConnectionConfig config)
config
- New property value.HttpClientBuilder.setDefaultConnectionConfig(ConnectionConfig)
public RestClientBuilder connectionTimeToLive(long connTimeToLive, TimeUnit connTimeToLiveTimeUnit)
connTimeToLive
- New property value.connTimeToLiveTimeUnit
- New property value.HttpClientBuilder.setConnectionTimeToLive(long,TimeUnit)
public RestClientBuilder connectionManager(HttpClientConnectionManager connManager)
connManager
- New property value.HttpClientBuilder.setConnectionManager(HttpClientConnectionManager)
public RestClientBuilder connectionManagerShared(boolean shared)
shared
- New property value.HttpClientBuilder.setConnectionManagerShared(boolean)
public RestClientBuilder connectionReuseStrategy(ConnectionReuseStrategy reuseStrategy)
reuseStrategy
- New property value.HttpClientBuilder.setConnectionReuseStrategy(ConnectionReuseStrategy)
public RestClientBuilder keepAliveStrategy(ConnectionKeepAliveStrategy keepAliveStrategy)
keepAliveStrategy
- New property value.HttpClientBuilder.setKeepAliveStrategy(ConnectionKeepAliveStrategy)
public RestClientBuilder targetAuthenticationStrategy(AuthenticationStrategy targetAuthStrategy)
targetAuthStrategy
- New property value.HttpClientBuilder.setTargetAuthenticationStrategy(AuthenticationStrategy)
public RestClientBuilder proxyAuthenticationStrategy(AuthenticationStrategy proxyAuthStrategy)
proxyAuthStrategy
- New property value.HttpClientBuilder.setProxyAuthenticationStrategy(AuthenticationStrategy)
public RestClientBuilder userTokenHandler(UserTokenHandler userTokenHandler)
userTokenHandler
- New property value.HttpClientBuilder.setUserTokenHandler(UserTokenHandler)
public RestClientBuilder disableConnectionState()
HttpClientBuilder.disableConnectionState()
public RestClientBuilder schemePortResolver(SchemePortResolver schemePortResolver)
schemePortResolver
- New property value.HttpClientBuilder.setSchemePortResolver(SchemePortResolver)
public RestClientBuilder userAgent(String userAgent)
userAgent
- New property value.HttpClientBuilder.setUserAgent(String)
public RestClientBuilder defaultHeaders(Collection<? extends Header> defaultHeaders)
defaultHeaders
- New property value.HttpClientBuilder.setDefaultHeaders(Collection)
public RestClientBuilder addInterceptorFirst(HttpResponseInterceptor itcp)
itcp
- New property value.HttpClientBuilder.addInterceptorFirst(HttpResponseInterceptor)
public RestClientBuilder addInterceptorLast(HttpResponseInterceptor itcp)
itcp
- New property value.HttpClientBuilder.addInterceptorLast(HttpResponseInterceptor)
public RestClientBuilder addInterceptorFirst(HttpRequestInterceptor itcp)
itcp
- New property value.HttpClientBuilder.addInterceptorFirst(HttpRequestInterceptor)
public RestClientBuilder addInterceptorLast(HttpRequestInterceptor itcp)
itcp
- New property value.HttpClientBuilder.addInterceptorLast(HttpRequestInterceptor)
public RestClientBuilder disableCookieManagement()
HttpClientBuilder.disableCookieManagement()
public RestClientBuilder disableContentCompression()
HttpClientBuilder.disableContentCompression()
public RestClientBuilder disableAuthCaching()
HttpClientBuilder.disableAuthCaching()
public RestClientBuilder httpProcessor(HttpProcessor httpprocessor)
httpprocessor
- New property value.HttpClientBuilder.setHttpProcessor(HttpProcessor)
public RestClientBuilder retryHandler(HttpRequestRetryHandler retryHandler)
retryHandler
- New property value.HttpClientBuilder.setRetryHandler(HttpRequestRetryHandler)
public RestClientBuilder disableAutomaticRetries()
HttpClientBuilder.disableAutomaticRetries()
public RestClientBuilder proxy(HttpHost proxy)
proxy
- New property value.HttpClientBuilder.setProxy(HttpHost)
public RestClientBuilder routePlanner(HttpRoutePlanner routePlanner)
routePlanner
- New property value.HttpClientBuilder.setRoutePlanner(HttpRoutePlanner)
public RestClientBuilder connectionBackoffStrategy(ConnectionBackoffStrategy connectionBackoffStrategy)
connectionBackoffStrategy
- New property value.HttpClientBuilder.setConnectionBackoffStrategy(ConnectionBackoffStrategy)
public RestClientBuilder backoffManager(BackoffManager backoffManager)
backoffManager
- New property value.HttpClientBuilder.setBackoffManager(BackoffManager)
public RestClientBuilder serviceUnavailableRetryStrategy(ServiceUnavailableRetryStrategy serviceUnavailStrategy)
serviceUnavailStrategy
- New property value.HttpClientBuilder.setServiceUnavailableRetryStrategy(ServiceUnavailableRetryStrategy)
public RestClientBuilder defaultCookieStore(CookieStore cookieStore)
cookieStore
- New property value.HttpClientBuilder.setDefaultCookieStore(CookieStore)
public RestClientBuilder defaultCredentialsProvider(CredentialsProvider credentialsProvider)
credentialsProvider
- New property value.HttpClientBuilder.setDefaultCredentialsProvider(CredentialsProvider)
public RestClientBuilder defaultAuthSchemeRegistry(Lookup<AuthSchemeProvider> authSchemeRegistry)
authSchemeRegistry
- New property value.HttpClientBuilder.setDefaultAuthSchemeRegistry(Lookup)
public RestClientBuilder contentDecoderRegistry(Map<String,InputStreamFactory> contentDecoderMap)
contentDecoderMap
- New property value.HttpClientBuilder.setContentDecoderRegistry(Map)
public RestClientBuilder defaultRequestConfig(RequestConfig config)
config
- New property value.HttpClientBuilder.setDefaultRequestConfig(RequestConfig)
public RestClientBuilder useSystemProperties()
HttpClientBuilder.useSystemProperties()
public RestClientBuilder evictExpiredConnections()
HttpClientBuilder.evictExpiredConnections()
public RestClientBuilder evictIdleConnections(long maxIdleTime, TimeUnit maxIdleTimeUnit)
maxIdleTime
- New property value.maxIdleTimeUnit
- New property value.HttpClientBuilder.evictIdleConnections(long,TimeUnit)
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.