Class AbstractRestClient

java.lang.Object
org.refcodes.rest.AbstractRestClient
All Implemented Interfaces:
DeleteRestClient, GetRestClient, PostRestClient, PutRestClient, RestClient, RestRequestClient, RestRequestHandler, BasicAuthCredentialsAccessor, BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<RestClient>, BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator, BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty, MediaTypeFactoryLookup, MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup, OauthTokenAccessor, OauthTokenAccessor.OauthTokenBuilder<RestClient>, OauthTokenAccessor.OauthTokenMutator, OauthTokenAccessor.OauthTokenProperty, UserAgentAccessor, UserAgentAccessor.UserAgentBuilder<RestClient>, UserAgentAccessor.UserAgentMutator, UserAgentAccessor.UserAgentProperty
Direct Known Subclasses:
JdkHttpRestClient, LoopbackRestClient

public abstract class AbstractRestClient extends Object implements RestClient

Abstract base implementation of the RestClient interface being the foundation for various RestClient implementations such as JdkHttpRestClient or LoopbackRestClient. The AbstractRestClient is preconfigured with the following MediaTypeFactory instances:

In your sub-classes, overwrite the method initMedaTypeFactories(), therein calling addMediaTypeFactory(MediaTypeFactory) to add (by also invoking super's initMedaTypeFactories()) or to set your own (without invoking super's initMedaTypeFactories()) MediaTypeFactory instances.