Interface RestClient

  • All Superinterfaces:
    org.refcodes.web.BasicAuthCredentialsAccessor, org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<RestClient>, org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator, org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty, org.refcodes.web.MediaTypeFactoryLookup, org.refcodes.web.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup, org.refcodes.web.OauthTokenAccessor, org.refcodes.web.OauthTokenAccessor.OauthTokenBuilder<RestClient>, org.refcodes.web.OauthTokenAccessor.OauthTokenMutator, org.refcodes.web.OauthTokenAccessor.OauthTokenProperty, org.refcodes.runtime.RequestCorrelation<RestClient>, RestDeleteClient, RestGetClient, RestPostClient, RestPutClient, RestRequestClient, RestRequestHandler, org.refcodes.runtime.SessionCorrelation<RestClient>, org.refcodes.web.UserAgentAccessor, org.refcodes.web.UserAgentAccessor.UserAgentBuilder<RestClient>, org.refcodes.web.UserAgentAccessor.UserAgentMutator, org.refcodes.web.UserAgentAccessor.UserAgentProperty
    All Known Subinterfaces:
    HttpDiscoveryRestClient<B>, HttpRestClient, LoopbackRestClient
    All Known Implementing Classes:
    AbstractHttpDiscoveryRestClientDecorator, AbstractHttpRestClientDecorator, AbstractRestClient, HttpRestClientImpl, HttpRestClientSingleton, LoopbackRestClientImpl, LoopbackRestClientSingleton

    public interface RestClient
    extends org.refcodes.web.OauthTokenAccessor.OauthTokenProperty, org.refcodes.web.OauthTokenAccessor.OauthTokenBuilder<RestClient>, RestGetClient, RestPostClient, RestDeleteClient, RestPutClient, org.refcodes.web.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup, org.refcodes.web.UserAgentAccessor.UserAgentProperty, org.refcodes.web.UserAgentAccessor.UserAgentBuilder<RestClient>, org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty, org.refcodes.web.BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<RestClient>, org.refcodes.runtime.RequestCorrelation<RestClient>, org.refcodes.runtime.SessionCorrelation<RestClient>
    A client to send requests for communicating with a RESTful server such as the HttpRestServer. For marshaling and unmarshaling HTTP bodies you have to register the according MediaTypeFactory instances being capable of handling the according MediaType definitions. Examples for ready to use MediaTypeFactory implementations are
    • JsonMediaTypeFactory,
    • XmlMediaTypeFactory
    • FormMediaTypeFactory
    • TextMediaTypeFactory
    Implementations of the RestClient interface, such as the HttpRestClientImpl, are initialized with some common MediaTypeFactory instances. You may set an individual User-Agent via UserAgentAccessor.UserAgentMutator.setUserAgent(String), not setting it will result in the default User-Agent to be set as coded into the RestClient implementations.