public abstract class AbstractHttpRestClientDecorator<B extends HttpRestClient> extends Object implements HttpRestClient
HttpRestClient
.org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B>>
org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B>>
org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
org.refcodes.net.UserAgentAccessor.UserAgentBuilder<B extends org.refcodes.net.UserAgentAccessor.UserAgentBuilder<B>>, org.refcodes.net.UserAgentAccessor.UserAgentMutator, org.refcodes.net.UserAgentAccessor.UserAgentProperty
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B>>, org.refcodes.net.BaseUrlAccessor.BaseUrlMutator, org.refcodes.net.BaseUrlAccessor.BaseUrlProperty
org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B extends org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>>, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
DEFAULT_KEYSTORE_TYPE, DEFAULT_SSL_PROTOCOL
Constructor and Description |
---|
AbstractHttpRestClientDecorator(HttpRestClient aClient)
Decorates the given
HttpRestClient . |
Modifier and Type | Method and Description |
---|---|
boolean |
addMediaTypeFactory(org.refcodes.net.MediaTypeFactory aMediaTypeFactory) |
RestRequestBuilder |
buildRequest(org.refcodes.net.HttpMethod aHttpMethod,
org.refcodes.net.Url aUrl,
org.refcodes.net.RequestHeaderFields aHeaderFields,
Object aRequest)
Prepares a request builder with the possible attributes and returns the
according request's
RestRequestBuilder instance. |
void |
close() |
void |
closeIn(int aCloseInMillis) |
void |
closeQuietly() |
void |
closeUnchecked() |
void |
disableRequestCorrelation() |
void |
disableSessionCorrelation() |
RestResponse |
doRequest(org.refcodes.net.HttpMethod aHttpMethod,
org.refcodes.net.Url aUrl,
org.refcodes.net.RequestHeaderFields aHeaderFields,
Object aRequest)
Sends a request with the possible attributes and returns the according
request's
RestResponse instance synchronously. |
RestCallerBuilder |
doRequest(org.refcodes.net.HttpMethod aHttpMethod,
org.refcodes.net.Url aUrl,
org.refcodes.net.RequestHeaderFields aHeaderFields,
Object aRequest,
RestResponseObserver aResponseObserver)
Creates a request with the possible attributes and returns the according
RestCallerBuilder instance used for the request. |
void |
enableRequestCorrelation() |
void |
enableSessionCorrelation() |
org.refcodes.net.Url |
getBaseUrl() |
org.refcodes.component.ConnectionStatus |
getConnectionStatus() |
org.refcodes.net.MediaType[] |
getFactoryMediaTypes() |
org.refcodes.security.TrustStoreDescriptor |
getTrustStoreDescriptor() |
String |
getUserAgent() |
boolean |
hasMediaTypeFactory(org.refcodes.net.MediaType aMediaType) |
boolean |
hasRequestCorrelation() |
boolean |
hasSessionCorrelation() |
void |
open() |
void |
open(org.refcodes.net.Url aBaseUrl,
org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
Configures the HTTPS client connection with the provided configuration
parameters.
|
void |
openUnchecked() |
void |
setBaseUrl(org.refcodes.data.Scheme aProtocol,
String aHost) |
void |
setBaseUrl(org.refcodes.data.Scheme aProtocol,
String aHost,
int aPort) |
void |
setBaseUrl(org.refcodes.data.Scheme aProtocol,
String aHost,
int aPort,
String aPath) |
void |
setBaseUrl(org.refcodes.data.Scheme aProtocol,
String aHost,
String aPath) |
void |
setBaseUrl(String aBaseUrl) |
void |
setBaseUrl(String aProtocol,
String aHost) |
void |
setBaseUrl(String aProtocol,
String aHost,
int aPort) |
void |
setBaseUrl(String aProtocol,
String aHost,
int aPort,
String aPath) |
void |
setBaseUrl(String aProtocol,
String aHost,
String aPath) |
void |
setBaseUrl(org.refcodes.net.Url aBaseUrl) |
void |
setBaseUrl(URL aBaseUrl) |
void |
setRequestCorrelation(boolean hasRequestCorrelation) |
void |
setSessionCorrelation(boolean hasSessionCorrelation) |
void |
setTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) |
void |
setUserAgent(String aUserAgent) |
org.refcodes.net.MediaTypeFactory |
toMediaTypeFactory(org.refcodes.net.MediaType aMediaType) |
protected org.refcodes.net.Url |
toUrl(org.refcodes.net.Url aUrl)
Hook for sub-classes to modify the request URL.
|
B |
withBaseUrl(org.refcodes.data.Scheme aProtocol,
String aHost) |
B |
withBaseUrl(org.refcodes.data.Scheme aProtocol,
String aHost,
int aPort) |
B |
withBaseUrl(org.refcodes.data.Scheme aProtocol,
String aHost,
int aPort,
String aPath) |
B |
withBaseUrl(org.refcodes.data.Scheme aProtocol,
String aHost,
String aPath) |
B |
withBaseUrl(String aBaseUrl) |
B |
withBaseUrl(String aProtocol,
String aHost) |
B |
withBaseUrl(String aProtocol,
String aHost,
int aPort) |
B |
withBaseUrl(String aProtocol,
String aHost,
int aPort,
String aPath) |
B |
withBaseUrl(String aProtocol,
String aHost,
String aPath) |
B |
withBaseUrl(org.refcodes.net.Url aBaseUrl) |
B |
withBaseUrl(URL aBaseURL) |
B |
withDisableRequestCorrelation() |
B |
withDisableSessionCorrelation() |
B |
withEnableRequestCorrelation() |
B |
withEnableSessionCorrelation() |
B |
withRequestCorrelation(boolean hasRequestCorrelation) |
B |
withSessionCorrelation(boolean hasSessionCorrelation) |
B |
withUserAgent(String aUserAgent) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
open, open, open, withTrustStoreDescriptor
buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, buildGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet, doGet
buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, buildPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost, doPost
buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, buildDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete, doDelete
buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, buildPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut, doPut
buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, buildRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest, doRequest
public AbstractHttpRestClientDecorator(HttpRestClient aClient)
HttpRestClient
.aClient
- The HttpRestClient
to be decorated.public org.refcodes.component.ConnectionStatus getConnectionStatus()
getConnectionStatus
in interface org.refcodes.component.ConnectionStatusAccessor
public boolean addMediaTypeFactory(org.refcodes.net.MediaTypeFactory aMediaTypeFactory)
addMediaTypeFactory
in interface org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
public void close() throws org.refcodes.component.CloseException
close
in interface org.refcodes.component.Closable
org.refcodes.component.CloseException
public void closeIn(int aCloseInMillis)
closeIn
in interface org.refcodes.component.Closable
public void closeQuietly()
closeQuietly
in interface org.refcodes.component.Closable
public void closeUnchecked()
closeUnchecked
in interface org.refcodes.component.Closable
public void disableRequestCorrelation()
disableRequestCorrelation
in interface org.refcodes.runtime.RequestCorrelation<RestClient>
public void disableSessionCorrelation()
disableSessionCorrelation
in interface org.refcodes.runtime.SessionCorrelation<RestClient>
public void enableRequestCorrelation()
enableRequestCorrelation
in interface org.refcodes.runtime.RequestCorrelation<RestClient>
public void enableSessionCorrelation()
enableSessionCorrelation
in interface org.refcodes.runtime.SessionCorrelation<RestClient>
public org.refcodes.net.Url getBaseUrl()
getBaseUrl
in interface org.refcodes.net.BaseUrlAccessor
public org.refcodes.net.MediaType[] getFactoryMediaTypes()
getFactoryMediaTypes
in interface org.refcodes.net.MediaTypeFactoryLookup
public org.refcodes.security.TrustStoreDescriptor getTrustStoreDescriptor()
getTrustStoreDescriptor
in interface org.refcodes.security.TrustStoreDescriptorAccessor
public String getUserAgent()
getUserAgent
in interface org.refcodes.net.UserAgentAccessor
public boolean hasMediaTypeFactory(org.refcodes.net.MediaType aMediaType)
hasMediaTypeFactory
in interface org.refcodes.net.MediaTypeFactoryLookup
public boolean hasRequestCorrelation()
hasRequestCorrelation
in interface org.refcodes.runtime.RequestCorrelation<RestClient>
public boolean hasSessionCorrelation()
hasSessionCorrelation
in interface org.refcodes.runtime.SessionCorrelation<RestClient>
public void open() throws org.refcodes.component.OpenException
open
in interface org.refcodes.component.Openable
open
in interface HttpRestClient
org.refcodes.component.OpenException
public void open(org.refcodes.net.Url aBaseUrl, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) throws org.refcodes.component.OpenException
open
in interface HttpRestClient
aBaseUrl
- The base Url
to be used.aStoreDescriptor
- The TrustStoreDescriptor
pointing to your
KeyStore
.org.refcodes.component.OpenException
- thrown in case something went wrong.public void openUnchecked()
openUnchecked
in interface org.refcodes.component.Openable
public void setBaseUrl(org.refcodes.data.Scheme aProtocol, String aHost) throws MalformedURLException
setBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
MalformedURLException
public void setBaseUrl(org.refcodes.data.Scheme aProtocol, String aHost, int aPort) throws MalformedURLException
setBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
MalformedURLException
public void setBaseUrl(org.refcodes.data.Scheme aProtocol, String aHost, int aPort, String aPath) throws MalformedURLException
setBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
MalformedURLException
public void setBaseUrl(org.refcodes.data.Scheme aProtocol, String aHost, String aPath) throws MalformedURLException
setBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
MalformedURLException
public void setBaseUrl(String aBaseUrl) throws MalformedURLException
setBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
MalformedURLException
public void setBaseUrl(String aProtocol, String aHost) throws MalformedURLException
setBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
MalformedURLException
public void setBaseUrl(String aProtocol, String aHost, int aPort) throws MalformedURLException
setBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
MalformedURLException
public void setBaseUrl(String aProtocol, String aHost, int aPort, String aPath) throws MalformedURLException
setBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
MalformedURLException
public void setBaseUrl(String aProtocol, String aHost, String aPath) throws MalformedURLException
setBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
MalformedURLException
public void setBaseUrl(org.refcodes.net.Url aBaseUrl)
setBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
public void setBaseUrl(URL aBaseUrl)
setBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
public void setRequestCorrelation(boolean hasRequestCorrelation)
setRequestCorrelation
in interface org.refcodes.runtime.RequestCorrelation<RestClient>
public void setSessionCorrelation(boolean hasSessionCorrelation)
setSessionCorrelation
in interface org.refcodes.runtime.SessionCorrelation<RestClient>
public void setTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
setTrustStoreDescriptor
in interface org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
public void setUserAgent(String aUserAgent)
setUserAgent
in interface org.refcodes.net.UserAgentAccessor.UserAgentMutator
public org.refcodes.net.MediaTypeFactory toMediaTypeFactory(org.refcodes.net.MediaType aMediaType)
toMediaTypeFactory
in interface org.refcodes.net.MediaTypeFactoryLookup
public B withBaseUrl(org.refcodes.data.Scheme aProtocol, String aHost) throws MalformedURLException
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
MalformedURLException
public B withBaseUrl(org.refcodes.data.Scheme aProtocol, String aHost, int aPort) throws MalformedURLException
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
MalformedURLException
public B withBaseUrl(org.refcodes.data.Scheme aProtocol, String aHost, int aPort, String aPath) throws MalformedURLException
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
MalformedURLException
public B withBaseUrl(org.refcodes.data.Scheme aProtocol, String aHost, String aPath) throws MalformedURLException
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
MalformedURLException
public B withBaseUrl(String aBaseUrl) throws MalformedURLException
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
MalformedURLException
public B withBaseUrl(String aProtocol, String aHost) throws MalformedURLException
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
MalformedURLException
public B withBaseUrl(String aProtocol, String aHost, int aPort) throws MalformedURLException
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
MalformedURLException
public B withBaseUrl(String aProtocol, String aHost, int aPort, String aPath) throws MalformedURLException
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
MalformedURLException
public B withBaseUrl(String aProtocol, String aHost, String aPath) throws MalformedURLException
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
MalformedURLException
public B withBaseUrl(org.refcodes.net.Url aBaseUrl)
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
public B withBaseUrl(URL aBaseURL)
withBaseUrl
in interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>
public B withDisableRequestCorrelation()
withDisableRequestCorrelation
in interface HttpRestClient
withDisableRequestCorrelation
in interface RestClient
withDisableRequestCorrelation
in interface org.refcodes.runtime.RequestCorrelation<RestClient>
public B withDisableSessionCorrelation()
withDisableSessionCorrelation
in interface HttpRestClient
withDisableSessionCorrelation
in interface RestClient
withDisableSessionCorrelation
in interface org.refcodes.runtime.SessionCorrelation<RestClient>
public B withEnableRequestCorrelation()
withEnableRequestCorrelation
in interface HttpRestClient
withEnableRequestCorrelation
in interface RestClient
withEnableRequestCorrelation
in interface org.refcodes.runtime.RequestCorrelation<RestClient>
public B withEnableSessionCorrelation()
withEnableSessionCorrelation
in interface HttpRestClient
withEnableSessionCorrelation
in interface RestClient
withEnableSessionCorrelation
in interface org.refcodes.runtime.SessionCorrelation<RestClient>
public B withRequestCorrelation(boolean hasRequestCorrelation)
withRequestCorrelation
in interface HttpRestClient
withRequestCorrelation
in interface RestClient
withRequestCorrelation
in interface org.refcodes.runtime.RequestCorrelation<RestClient>
public B withSessionCorrelation(boolean hasSessionCorrelation)
withSessionCorrelation
in interface HttpRestClient
withSessionCorrelation
in interface RestClient
withSessionCorrelation
in interface org.refcodes.runtime.SessionCorrelation<RestClient>
public B withUserAgent(String aUserAgent)
withUserAgent
in interface org.refcodes.net.UserAgentAccessor.UserAgentBuilder<RestClient>
withUserAgent
in interface HttpRestClient
withUserAgent
in interface RestClient
public RestRequestBuilder buildRequest(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.net.RequestHeaderFields aHeaderFields, Object aRequest)
RestRequestClient
RestRequestBuilder
instance. Invoking
RestRequestBuilder.toRestResponse()
starts the request and
synchronously returns the response.buildRequest
in interface RestRequestClient
aHttpMethod
- The HTTP-Method for the request.aUrl
- The Url
from which to take the URL specific data.aHeaderFields
- The HTTP-Header's fields to be used for the request.aRequest
- The body to be sent with the request (e.g. when doing a
HttpMethod.POST
request.RestRequestBuilder
at this request.public RestResponse doRequest(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.net.RequestHeaderFields aHeaderFields, Object aRequest) throws org.refcodes.net.HttpResponseException
RestRequestClient
RestResponse
instance synchronously.doRequest
in interface RestRequestClient
aHttpMethod
- The HTTP-Method for the request.aUrl
- The Url
from which to take the URL specific data.aHeaderFields
- The HTTP-Header's fields to be used for the request.aRequest
- The body to be sent with the request (e.g. when doing a
HttpMethod.POST
request.RestResponse
for this request.org.refcodes.net.HttpResponseException
- thrown in case of some unexpected response.public RestCallerBuilder doRequest(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.net.RequestHeaderFields aHeaderFields, Object aRequest, RestResponseObserver aResponseObserver)
RestRequestClient
RestCallerBuilder
instance used for the request.
The HTTP-Request is actually sent not earlier than you calling
Openable.open()
on the returned
RestCallerBuilder
as the RestCallerBuilder
still may be
modified after invoking this method!doRequest
in interface RestRequestClient
aHttpMethod
- The HTTP-Method for the request.aUrl
- The Url
from which to take the URL specific data.aHeaderFields
- The HTTP-Header's fields to be used for the request.aRequest
- The body to be sent with the request (e.g. when doing a
HttpMethod.POST
request.aResponseObserver
- The listener processing a response targeted at
this RestCallerBuilder
.RestCallerBuilder
which is used by the request.protected org.refcodes.net.Url toUrl(org.refcodes.net.Url aUrl)
aUrl
- The Url
for the request.Url
, by default it returns the provided
Url
unmodified.Copyright © 2018. All rights reserved.