public class MockRestClient extends RestClientBuilder
psb
Modifier | Constructor and Description |
---|---|
protected |
MockRestClient(Object impl)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
RestClient |
build()
Build the object.
|
static RestClient |
build(Object impl,
Marshall m)
Convenience method for creating a RestClient over the specified REST implementation bean or bean class.
|
static RestClient |
build(Object impl,
Serializer s,
Parser p)
Convenience method for creating a RestClient over the specified REST implementation bean or bean class.
|
static MockRestClient |
create(Object impl)
Creates a new RestClient builder configured with the specified REST implementation bean or bean class.
|
static MockRestClient |
create(Object impl,
Marshall m)
Creates a new RestClient builder configured with the specified REST implementation bean or bean class.
|
static MockRestClient |
create(Object impl,
Serializer s,
Parser p)
Creates a new RestClient builder configured with the specified REST implementation bean or bean class.
|
MockRestClient |
debug()
Enable debug mode.
|
MockRestClient |
html()
Convenience method for setting
|
MockRestClient |
json()
Convenience method for setting
|
MockRestClient |
marshall(Marshall value)
Configuration property: Marshall
|
MockRestClient |
msgpack()
Convenience method for setting
|
MockRestClient |
openapi()
Convenience method for setting
|
MockRestClient |
parser(Parser value)
Configuration property: Parser.
|
MockRestClient |
plainText()
Convenience method for setting
|
MockRestClient |
serializer(Serializer value)
Configuration property: Serializer.
|
MockRestClient |
simpleJson()
Convenience method for setting
|
MockRestClient |
uon()
Convenience method for setting
|
MockRestClient |
urlEnc()
Convenience method for setting
|
MockRestClient |
xml()
Convenience method for setting
|
accept, acceptCharset, acceptEncoding, acceptLanguage, add, addBeanTypes, addBeanTypes, addInterceptorFirst, addInterceptorFirst, addInterceptorLast, addInterceptorLast, addRootType, addRootType, addTo, addTo, annotations, apply, applyAnnotations, applyAnnotations, applyAnnotations, authorization, autoCloseStreams, autoCloseStreams, backoffManager, basicAuth, beanClassVisibility, beanConstructorVisibility, beanDictionary, beanDictionary, beanDictionaryRemove, beanDictionaryRemove, beanDictionaryReplace, beanDictionaryReplace, beanFieldVisibility, beanFilters, beanFilters, beanFiltersRemove, beanFiltersRemove, beanFiltersReplace, beanFiltersReplace, beanMapPutReturnsOldValue, beanMapPutReturnsOldValue, beanMethodVisibility, beansRequireDefaultConstructor, beansRequireDefaultConstructor, beansRequireSerializable, beansRequireSerializable, beansRequireSettersForGetters, beansRequireSettersForGetters, beansRequireSomeProperties, beanTypePropertyName, binaryInputFormat, binaryOutputFormat, bpi, bpi, bpi, bpro, bpro, bpro, bpwo, bpwo, bpwo, bpx, bpx, bpx, cacheControl, cipherSuites, clientVersion, connection, connectionBackoffStrategy, connectionManager, connectionManagerShared, connectionReuseStrategy, connectionTimeToLive, contentDecoderRegistry, contentLength, contentType, createConnectionManager, createHttpClient, createHttpClientBuilder, date, debug, debugOutputLines, defaultAuthSchemeRegistry, defaultConnectionConfig, defaultCookieSpecRegistry, defaultCookieStore, defaultCredentialsProvider, defaultHeaders, defaultRequestConfig, defaultSocketConfig, detectRecursions, detectRecursions, dictionary, dictionary, dictionaryRemove, dictionaryRemove, dictionaryReplace, dictionaryReplace, disableAuthCaching, disableAutomaticRetries, disableConnectionState, disableContentCompression, disableCookieManagement, disableRedirectHandling, enableLaxSSL, enableSSL, evictExpiredConnections, evictIdleConnections, example, exampleJson, executorService, expect, fileCharset, forwarded, from, getHttpClient, getHttpClientBuilder, header, headers, host, hostnameVerifier, httpClient, httpClient, httpClientBuilder, httpClientConnectionManager, httpProcessor, ifMatch, ifModifiedSince, ifNoneMatch, ifRange, ifUnmodifiedSince, ignoreInvocationExceptionsOnGetters, ignoreInvocationExceptionsOnGetters, ignoreInvocationExceptionsOnSetters, ignoreInvocationExceptionsOnSetters, ignorePropertiesWithoutSetters, ignoreRecursions, ignoreRecursions, ignoreUnknownBeanProperties, ignoreUnknownBeanProperties, ignoreUnknownNullBeanProperties, implClass, implClasses, initialDepth, inputStreamCharset, interceptors, keepAliveStrategy, keepHttpClientOpen, keepHttpClientOpen, keyManagers, listenerP, listenerS, locale, logTo, maxConnPerRoute, maxConnTotal, maxDepth, maxForwards, maxIndent, mediaType, notBeanClasses, notBeanClasses, notBeanClassesRemove, notBeanClassesRemove, notBeanClassesReplace, notBeanClassesReplace, notBeanPackages, notBeanPackages, notBeanPackagesRemove, notBeanPackagesRemove, notBeanPackagesReplace, notBeanPackagesReplace, noTrace, origin, paramFormat, paramFormatPlain, parser, partParser, partParser, partSerializer, partSerializer, pojoSwaps, pojoSwaps, pojoSwapsRemove, pojoSwapsRemove, pojoSwapsReplace, pojoSwapsReplace, pooled, pragma, proxy, proxyAuthenticationStrategy, proxyAuthorization, publicSuffixMatcher, query, quoteChar, range, redirectStrategy, referer, removeFrom, requestExecutor, retryable, retryHandler, rootUrl, routePlanner, schemePortResolver, secureRandom, serializer, serviceUnavailableRetryStrategy, set, set, sortCollections, sortCollections, sortMaps, sortMaps, sortProperties, sortProperties, sq, sslContext, sslHostnameVerifier, sslProtocols, sslSocketFactory, strict, strict, targetAuthenticationStrategy, te, timeZone, trimEmptyCollections, trimEmptyCollections, trimEmptyMaps, trimEmptyMaps, trimNullProperties, trimStringsP, trimStringsP, trimStringsS, trimStringsS, trustManagers, unbuffered, unbuffered, upgrade, uriContext, uriRelativity, uriResolution, useEnumNames, useEnumNames, useInterfaceProxies, useJavaBeanIntrospector, useJavaBeanIntrospector, userAgent, userAgent, userTokenHandler, useSystemProperties, useWhitespace, useWhitespace, via, warning, ws
examples, excludeProperties, excludeProperties, excludeProperties, fluentSetters, fluentSetters, includeProperties, includeProperties, includeProperties, propertyNamer
build, getPropertyStore, getPropertyStoreBuilder, peek, peek
protected MockRestClient(Object impl)
impl
- The REST bean or bean class annotated with @Rest
.
public static MockRestClient create(Object impl)
impl
- The REST bean or bean class annotated with @Rest
.
public static MockRestClient create(Object impl, Marshall m)
impl
- The REST bean or bean class annotated with @Rest
.
m
- The marshall to use for serializing and parsing HTTP bodies.
public static MockRestClient create(Object impl, Serializer s, Parser p)
impl
- The REST bean or bean class annotated with @Rest
.
s
- The serializer to use for serializing HTTP bodies.
p
- The parser to use for parsing HTTP bodies.
public static RestClient build(Object impl, Marshall m)
Equivalent to calling:
MockRestClient.create(impl, m).build();
public static RestClient build(Object impl, Serializer s, Parser p)
Equivalent to calling:
MockRestClient.create(impl, s, p).build();
impl
- The REST bean or bean class annotated with @Rest
.
s
- The serializer to use for serializing HTTP bodies.
p
- The parser to use for parsing HTTP bodies.
MockRest
object.public RestClient build()
ContextBuilder
build
in class RestClientBuilder
public MockRestClient debug()
debug
in class RestClientBuilder
public MockRestClient json()
json
in class RestClientBuilder
public MockRestClient simpleJson()
simpleJson
in class RestClientBuilder
public MockRestClient xml()
xml
in class RestClientBuilder
public MockRestClient html()
html
in class RestClientBuilder
public MockRestClient plainText()
plainText
in class RestClientBuilder
public MockRestClient msgpack()
msgpack
in class RestClientBuilder
public MockRestClient uon()
uon
in class RestClientBuilder
public MockRestClient urlEnc()
urlEnc
in class RestClientBuilder
public MockRestClient openapi()
openapi
in class RestClientBuilder
public MockRestClient marshall(Marshall value)
RestClientBuilder
Shortcut for specifying the RestClient.RESTCLIENT_serializer
and RestClient.RESTCLIENT_parser
using the serializer and parser defined in a marshall.
marshall
in class RestClientBuilder
value
- The values to add to this setting.public MockRestClient serializer(Serializer value)
RestClientBuilder
Same as RestClientBuilder.serializer(Class)
but takes in a serializer instance.
serializer
in class RestClientBuilder
value
- The new value for this setting.
JsonSerializer
.public MockRestClient parser(Parser value)
RestClientBuilder
Same as RestClientBuilder.parser(Parser)
except takes in a parser instance.
parser
in class RestClientBuilder
value
- The new value for this setting.
JsonParser.DEFAULT
.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.