Package org.refcodes.rest
Class AbstractHttpRestClientDecorator<B extends HttpRestClient>
- java.lang.Object
-
- org.refcodes.rest.AbstractHttpRestClientDecorator<B>
-
- All Implemented Interfaces:
org.refcodes.component.Closable,org.refcodes.component.ConnectionComponent<B>,org.refcodes.component.ConnectionOpenable<B>,org.refcodes.component.ConnectionStatusAccessor,org.refcodes.component.LinkComponent,org.refcodes.component.Openable,org.refcodes.net.BaseUrlAccessor,org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B>,org.refcodes.net.BaseUrlAccessor.BaseUrlMutator,org.refcodes.net.BaseUrlAccessor.BaseUrlProperty,org.refcodes.net.MediaTypeFactoryLookup,org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup,org.refcodes.net.UserAgentAccessor,org.refcodes.net.UserAgentAccessor.UserAgentBuilder<B>,org.refcodes.net.UserAgentAccessor.UserAgentMutator,org.refcodes.net.UserAgentAccessor.UserAgentProperty,HttpRestClient,RestClient,RestDeleteClient,RestGetClient,RestPostClient,RestPutClient,RestRequestClient,org.refcodes.runtime.RequestCorrelation<B>,org.refcodes.runtime.SessionCorrelation<B>,org.refcodes.security.TrustStoreDescriptorAccessor,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
- Direct Known Subclasses:
AbstractHttpDiscoveryRestClientDecorator
public abstract class AbstractHttpRestClientDecorator<B extends HttpRestClient> extends java.lang.Object implements HttpRestClient
Abstract class for easily decorating aHttpRestClient.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.net.BaseUrlAccessor
org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B>>, org.refcodes.net.BaseUrlAccessor.BaseUrlMutator, org.refcodes.net.BaseUrlAccessor.BaseUrlProperty
-
Nested classes/interfaces inherited from interface org.refcodes.component.Closable
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>
-
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionComponent
org.refcodes.component.ConnectionComponent.ConnectionAutomaton<CON extends java.lang.Object>, org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON extends java.lang.Object,B extends org.refcodes.component.ConnectionComponent.ConnectionComponentBuilder<CON,B>>
-
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionOpenable
org.refcodes.component.ConnectionOpenable.ConnectionOpenAutomaton<CON extends java.lang.Object>, org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON extends java.lang.Object,B extends org.refcodes.component.ConnectionOpenable.ConnectionOpenBuilder<CON,B>>
-
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
-
Nested classes/interfaces inherited from interface org.refcodes.component.LinkComponent
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>
-
Nested classes/interfaces inherited from interface org.refcodes.net.MediaTypeFactoryLookup
org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
-
Nested classes/interfaces inherited from interface org.refcodes.component.Openable
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>>
-
Nested classes/interfaces inherited from interface org.refcodes.security.TrustStoreDescriptorAccessor
org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B extends org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<B>>, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty
-
Nested classes/interfaces inherited from interface org.refcodes.net.UserAgentAccessor
org.refcodes.net.UserAgentAccessor.UserAgentBuilder<B extends org.refcodes.net.UserAgentAccessor.UserAgentBuilder<B>>, org.refcodes.net.UserAgentAccessor.UserAgentMutator, org.refcodes.net.UserAgentAccessor.UserAgentProperty
-
-
Field Summary
-
Fields inherited from interface org.refcodes.rest.HttpRestClient
DEFAULT_KEYSTORE_TYPE, DEFAULT_SSL_PROTOCOL
-
-
Constructor Summary
Constructors Constructor Description AbstractHttpRestClientDecorator(HttpRestClient aClient)Decorates the givenHttpRestClient.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddMediaTypeFactory(org.refcodes.net.MediaTypeFactory aMediaTypeFactory)RestRequestBuilderbuildRequest(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.net.RequestHeaderFields aHeaderFields, java.lang.Object aRequest, int aRedirectDepth)Prepares a request builder with the possible attributes and returns the according request'sRestRequestBuilderinstance.voidclose()voidcloseIn(int aCloseInMillis)voidcloseQuietly()voidcloseUnchecked()voiddisableRequestCorrelation()voiddisableSessionCorrelation()RestResponsedoRequest(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.net.RequestHeaderFields aHeaderFields, java.lang.Object aRequest, int aRedirectDepth)Sends a request with the possible attributes and returns the according request'sRestResponseinstance synchronously.RestCallerBuilderdoRequest(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.net.RequestHeaderFields aHeaderFields, java.lang.Object aRequest, int aRedirectDepth, RestResponseObserver aResponseObserver)Creates a request with the possible attributes and returns the accordingRestCallerBuilderinstance used for the request.voidenableRequestCorrelation()voidenableSessionCorrelation()org.refcodes.net.UrlgetBaseUrl()org.refcodes.component.ConnectionStatusgetConnectionStatus()org.refcodes.net.MediaType[]getFactoryMediaTypes()org.refcodes.security.TrustStoreDescriptorgetTrustStoreDescriptor()java.lang.StringgetUserAgent()booleanhasMediaTypeFactory(org.refcodes.net.MediaType aMediaType)booleanhasRequestCorrelation()booleanhasSessionCorrelation()voidopen()voidopen(org.refcodes.net.Url aBaseUrl, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)Configures the HTTPS client connection with the provided configuration parameters.voidopenUnchecked()voidsetBaseUrl(java.lang.String aBaseUrl)voidsetBaseUrl(java.lang.String aProtocol, java.lang.String aHost)voidsetBaseUrl(java.lang.String aProtocol, java.lang.String aHost, int aPort)voidsetBaseUrl(java.lang.String aProtocol, java.lang.String aHost, int aPort, java.lang.String aPath)voidsetBaseUrl(java.lang.String aProtocol, java.lang.String aHost, java.lang.String aPath)voidsetBaseUrl(java.net.URL aBaseUrl)voidsetBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost)voidsetBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, int aPort)voidsetBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, int aPort, java.lang.String aPath)voidsetBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, java.lang.String aPath)voidsetBaseUrl(org.refcodes.net.Url aBaseUrl)voidsetRequestCorrelation(boolean hasRequestCorrelation)voidsetSessionCorrelation(boolean hasSessionCorrelation)voidsetTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)voidsetUserAgent(java.lang.String aUserAgent)org.refcodes.net.MediaTypeFactorytoMediaTypeFactory(org.refcodes.net.MediaType aMediaType)protected org.refcodes.net.UrltoUrl(org.refcodes.net.Url aUrl)Hook for sub-classes to modify the request URL.BwithBaseUrl(java.lang.String aBaseUrl)BwithBaseUrl(java.lang.String aProtocol, java.lang.String aHost)BwithBaseUrl(java.lang.String aProtocol, java.lang.String aHost, int aPort)BwithBaseUrl(java.lang.String aProtocol, java.lang.String aHost, int aPort, java.lang.String aPath)BwithBaseUrl(java.lang.String aProtocol, java.lang.String aHost, java.lang.String aPath)BwithBaseUrl(java.net.URL aBaseURL)BwithBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost)BwithBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, int aPort)BwithBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, int aPort, java.lang.String aPath)BwithBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, java.lang.String aPath)BwithBaseUrl(org.refcodes.net.Url aBaseUrl)BwithDisableRequestCorrelation()BwithDisableSessionCorrelation()BwithEnableRequestCorrelation()BwithEnableSessionCorrelation()BwithRequestCorrelation(boolean hasRequestCorrelation)BwithSessionCorrelation(boolean hasSessionCorrelation)BwithUserAgent(java.lang.String aUserAgent)-
Methods inherited from interface org.refcodes.rest.HttpRestClient
open, open, open, withTrustStoreDescriptor
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.refcodes.rest.RestDeleteClient
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
-
Methods inherited from interface org.refcodes.rest.RestGetClient
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
-
Methods inherited from interface org.refcodes.rest.RestPostClient
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
-
Methods inherited from interface org.refcodes.rest.RestPutClient
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
-
Methods inherited from interface org.refcodes.rest.RestRequestClient
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, 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, doRequest, doRequest
-
-
-
-
Constructor Detail
-
AbstractHttpRestClientDecorator
public AbstractHttpRestClientDecorator(HttpRestClient aClient)
Decorates the givenHttpRestClient.- Parameters:
aClient- TheHttpRestClientto be decorated.
-
-
Method Detail
-
getConnectionStatus
public org.refcodes.component.ConnectionStatus getConnectionStatus()
- Specified by:
getConnectionStatusin interfaceorg.refcodes.component.ConnectionStatusAccessor
-
addMediaTypeFactory
public boolean addMediaTypeFactory(org.refcodes.net.MediaTypeFactory aMediaTypeFactory)
- Specified by:
addMediaTypeFactoryin interfaceorg.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
-
close
public void close() throws org.refcodes.component.CloseException- Specified by:
closein interfaceorg.refcodes.component.Closable- Throws:
org.refcodes.component.CloseException
-
closeIn
public void closeIn(int aCloseInMillis)
- Specified by:
closeInin interfaceorg.refcodes.component.Closable
-
closeQuietly
public void closeQuietly()
- Specified by:
closeQuietlyin interfaceorg.refcodes.component.Closable
-
closeUnchecked
public void closeUnchecked()
- Specified by:
closeUncheckedin interfaceorg.refcodes.component.Closable
-
disableRequestCorrelation
public void disableRequestCorrelation()
- Specified by:
disableRequestCorrelationin interfaceorg.refcodes.runtime.RequestCorrelation<B extends HttpRestClient>
-
disableSessionCorrelation
public void disableSessionCorrelation()
- Specified by:
disableSessionCorrelationin interfaceorg.refcodes.runtime.SessionCorrelation<B extends HttpRestClient>
-
enableRequestCorrelation
public void enableRequestCorrelation()
- Specified by:
enableRequestCorrelationin interfaceorg.refcodes.runtime.RequestCorrelation<B extends HttpRestClient>
-
enableSessionCorrelation
public void enableSessionCorrelation()
- Specified by:
enableSessionCorrelationin interfaceorg.refcodes.runtime.SessionCorrelation<B extends HttpRestClient>
-
getBaseUrl
public org.refcodes.net.Url getBaseUrl()
- Specified by:
getBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor
-
getFactoryMediaTypes
public org.refcodes.net.MediaType[] getFactoryMediaTypes()
- Specified by:
getFactoryMediaTypesin interfaceorg.refcodes.net.MediaTypeFactoryLookup
-
getTrustStoreDescriptor
public org.refcodes.security.TrustStoreDescriptor getTrustStoreDescriptor()
- Specified by:
getTrustStoreDescriptorin interfaceorg.refcodes.security.TrustStoreDescriptorAccessor
-
getUserAgent
public java.lang.String getUserAgent()
- Specified by:
getUserAgentin interfaceorg.refcodes.net.UserAgentAccessor
-
hasMediaTypeFactory
public boolean hasMediaTypeFactory(org.refcodes.net.MediaType aMediaType)
- Specified by:
hasMediaTypeFactoryin interfaceorg.refcodes.net.MediaTypeFactoryLookup
-
hasRequestCorrelation
public boolean hasRequestCorrelation()
- Specified by:
hasRequestCorrelationin interfaceorg.refcodes.runtime.RequestCorrelation<B extends HttpRestClient>
-
hasSessionCorrelation
public boolean hasSessionCorrelation()
- Specified by:
hasSessionCorrelationin interfaceorg.refcodes.runtime.SessionCorrelation<B extends HttpRestClient>
-
open
public void open() throws org.refcodes.component.OpenException- Specified by:
openin interfaceHttpRestClient- Specified by:
openin interfaceorg.refcodes.component.Openable- Throws:
org.refcodes.component.OpenException
-
open
public void open(org.refcodes.net.Url aBaseUrl, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) throws org.refcodes.component.OpenExceptionConfigures the HTTPS client connection with the provided configuration parameters.- Specified by:
openin interfaceHttpRestClient- Parameters:
aBaseUrl- The baseUrlto be used.aStoreDescriptor- TheTrustStoreDescriptorpointing to yourKeyStore.- Throws:
org.refcodes.component.OpenException- thrown in case something went wrong.
-
openUnchecked
public void openUnchecked()
- Specified by:
openUncheckedin interfaceorg.refcodes.component.Openable
-
setBaseUrl
public void setBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost) throws java.net.MalformedURLException- Specified by:
setBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlMutator- Throws:
java.net.MalformedURLException
-
setBaseUrl
public void setBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, int aPort) throws java.net.MalformedURLException- Specified by:
setBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlMutator- Throws:
java.net.MalformedURLException
-
setBaseUrl
public void setBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, int aPort, java.lang.String aPath) throws java.net.MalformedURLException- Specified by:
setBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlMutator- Throws:
java.net.MalformedURLException
-
setBaseUrl
public void setBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, java.lang.String aPath) throws java.net.MalformedURLException- Specified by:
setBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlMutator- Throws:
java.net.MalformedURLException
-
setBaseUrl
public void setBaseUrl(java.lang.String aBaseUrl) throws java.net.MalformedURLException- Specified by:
setBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlMutator- Throws:
java.net.MalformedURLException
-
setBaseUrl
public void setBaseUrl(java.lang.String aProtocol, java.lang.String aHost) throws java.net.MalformedURLException- Specified by:
setBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlMutator- Throws:
java.net.MalformedURLException
-
setBaseUrl
public void setBaseUrl(java.lang.String aProtocol, java.lang.String aHost, int aPort) throws java.net.MalformedURLException- Specified by:
setBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlMutator- Throws:
java.net.MalformedURLException
-
setBaseUrl
public void setBaseUrl(java.lang.String aProtocol, java.lang.String aHost, int aPort, java.lang.String aPath) throws java.net.MalformedURLException- Specified by:
setBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlMutator- Throws:
java.net.MalformedURLException
-
setBaseUrl
public void setBaseUrl(java.lang.String aProtocol, java.lang.String aHost, java.lang.String aPath) throws java.net.MalformedURLException- Specified by:
setBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlMutator- Throws:
java.net.MalformedURLException
-
setBaseUrl
public void setBaseUrl(org.refcodes.net.Url aBaseUrl)
- Specified by:
setBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlMutator
-
setBaseUrl
public void setBaseUrl(java.net.URL aBaseUrl)
- Specified by:
setBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlMutator
-
setRequestCorrelation
public void setRequestCorrelation(boolean hasRequestCorrelation)
- Specified by:
setRequestCorrelationin interfaceorg.refcodes.runtime.RequestCorrelation<B extends HttpRestClient>
-
setSessionCorrelation
public void setSessionCorrelation(boolean hasSessionCorrelation)
- Specified by:
setSessionCorrelationin interfaceorg.refcodes.runtime.SessionCorrelation<B extends HttpRestClient>
-
setTrustStoreDescriptor
public void setTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
- Specified by:
setTrustStoreDescriptorin interfaceorg.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator
-
setUserAgent
public void setUserAgent(java.lang.String aUserAgent)
- Specified by:
setUserAgentin interfaceorg.refcodes.net.UserAgentAccessor.UserAgentMutator
-
toMediaTypeFactory
public org.refcodes.net.MediaTypeFactory toMediaTypeFactory(org.refcodes.net.MediaType aMediaType)
- Specified by:
toMediaTypeFactoryin interfaceorg.refcodes.net.MediaTypeFactoryLookup
-
withBaseUrl
public B withBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost) throws java.net.MalformedURLException
- Specified by:
withBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends HttpRestClient>- Throws:
java.net.MalformedURLException
-
withBaseUrl
public B withBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, int aPort) throws java.net.MalformedURLException
- Specified by:
withBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends HttpRestClient>- Throws:
java.net.MalformedURLException
-
withBaseUrl
public B withBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, int aPort, java.lang.String aPath) throws java.net.MalformedURLException
- Specified by:
withBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends HttpRestClient>- Throws:
java.net.MalformedURLException
-
withBaseUrl
public B withBaseUrl(org.refcodes.data.Scheme aProtocol, java.lang.String aHost, java.lang.String aPath) throws java.net.MalformedURLException
- Specified by:
withBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends HttpRestClient>- Throws:
java.net.MalformedURLException
-
withBaseUrl
public B withBaseUrl(java.lang.String aBaseUrl) throws java.net.MalformedURLException
- Specified by:
withBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends HttpRestClient>- Throws:
java.net.MalformedURLException
-
withBaseUrl
public B withBaseUrl(java.lang.String aProtocol, java.lang.String aHost) throws java.net.MalformedURLException
- Specified by:
withBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends HttpRestClient>- Throws:
java.net.MalformedURLException
-
withBaseUrl
public B withBaseUrl(java.lang.String aProtocol, java.lang.String aHost, int aPort) throws java.net.MalformedURLException
- Specified by:
withBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends HttpRestClient>- Throws:
java.net.MalformedURLException
-
withBaseUrl
public B withBaseUrl(java.lang.String aProtocol, java.lang.String aHost, int aPort, java.lang.String aPath) throws java.net.MalformedURLException
- Specified by:
withBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends HttpRestClient>- Throws:
java.net.MalformedURLException
-
withBaseUrl
public B withBaseUrl(java.lang.String aProtocol, java.lang.String aHost, java.lang.String aPath) throws java.net.MalformedURLException
- Specified by:
withBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends HttpRestClient>- Throws:
java.net.MalformedURLException
-
withBaseUrl
public B withBaseUrl(org.refcodes.net.Url aBaseUrl)
- Specified by:
withBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends HttpRestClient>
-
withBaseUrl
public B withBaseUrl(java.net.URL aBaseURL)
- Specified by:
withBaseUrlin interfaceorg.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<B extends HttpRestClient>
-
withDisableRequestCorrelation
public B withDisableRequestCorrelation()
- Specified by:
withDisableRequestCorrelationin interfaceHttpRestClient- Specified by:
withDisableRequestCorrelationin interfaceorg.refcodes.runtime.RequestCorrelation<B extends HttpRestClient>- Specified by:
withDisableRequestCorrelationin interfaceRestClient
-
withDisableSessionCorrelation
public B withDisableSessionCorrelation()
- Specified by:
withDisableSessionCorrelationin interfaceHttpRestClient- Specified by:
withDisableSessionCorrelationin interfaceRestClient- Specified by:
withDisableSessionCorrelationin interfaceorg.refcodes.runtime.SessionCorrelation<B extends HttpRestClient>
-
withEnableRequestCorrelation
public B withEnableRequestCorrelation()
- Specified by:
withEnableRequestCorrelationin interfaceHttpRestClient- Specified by:
withEnableRequestCorrelationin interfaceorg.refcodes.runtime.RequestCorrelation<B extends HttpRestClient>- Specified by:
withEnableRequestCorrelationin interfaceRestClient
-
withEnableSessionCorrelation
public B withEnableSessionCorrelation()
- Specified by:
withEnableSessionCorrelationin interfaceHttpRestClient- Specified by:
withEnableSessionCorrelationin interfaceRestClient- Specified by:
withEnableSessionCorrelationin interfaceorg.refcodes.runtime.SessionCorrelation<B extends HttpRestClient>
-
withRequestCorrelation
public B withRequestCorrelation(boolean hasRequestCorrelation)
- Specified by:
withRequestCorrelationin interfaceHttpRestClient- Specified by:
withRequestCorrelationin interfaceorg.refcodes.runtime.RequestCorrelation<B extends HttpRestClient>- Specified by:
withRequestCorrelationin interfaceRestClient
-
withSessionCorrelation
public B withSessionCorrelation(boolean hasSessionCorrelation)
- Specified by:
withSessionCorrelationin interfaceHttpRestClient- Specified by:
withSessionCorrelationin interfaceRestClient- Specified by:
withSessionCorrelationin interfaceorg.refcodes.runtime.SessionCorrelation<B extends HttpRestClient>
-
withUserAgent
public B withUserAgent(java.lang.String aUserAgent)
- Specified by:
withUserAgentin interfaceHttpRestClient- Specified by:
withUserAgentin interfaceRestClient- Specified by:
withUserAgentin interfaceorg.refcodes.net.UserAgentAccessor.UserAgentBuilder<B extends HttpRestClient>
-
buildRequest
public RestRequestBuilder buildRequest(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.net.RequestHeaderFields aHeaderFields, java.lang.Object aRequest, int aRedirectDepth)
Prepares a request builder with the possible attributes and returns the according request'sRestRequestBuilderinstance. InvokingRestRequestBuilder.toRestResponse()starts the request and synchronously returns the response.- Specified by:
buildRequestin interfaceRestRequestClient- Parameters:
aHttpMethod- The HTTP-Method for the request.aUrl- TheUrlfrom 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 aHttpMethod.POSTrequest.- Returns:
- The
RestRequestBuilderat this request.
-
doRequest
public RestResponse doRequest(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.net.RequestHeaderFields aHeaderFields, java.lang.Object aRequest, int aRedirectDepth) throws org.refcodes.net.HttpResponseException
Sends a request with the possible attributes and returns the according request'sRestResponseinstance synchronously.- Specified by:
doRequestin interfaceRestRequestClient- Parameters:
aHttpMethod- The HTTP-Method for the request.aUrl- TheUrlfrom 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 aHttpMethod.POSTrequest.aRedirectDepth- The redirect depth provides the count of HTTP-Request and HTTP-Response cycles where the response represents a redirect as ofHttpStatusCode.isRedirectStatus(). A value of -1 represents the default behavior, e.g. usingHttpURLConnection's redirection means.- Returns:
- The
RestResponsefor this request. - Throws:
org.refcodes.net.HttpResponseException- thrown in case of some unexpected response.
-
doRequest
public RestCallerBuilder doRequest(org.refcodes.net.HttpMethod aHttpMethod, org.refcodes.net.Url aUrl, org.refcodes.net.RequestHeaderFields aHeaderFields, java.lang.Object aRequest, int aRedirectDepth, RestResponseObserver aResponseObserver)
Creates a request with the possible attributes and returns the accordingRestCallerBuilderinstance used for the request. The HTTP-Request is actually sent not earlier than you callingOpenable.open()on the returnedRestCallerBuilderas theRestCallerBuilderstill may be modified after invoking this method!- Specified by:
doRequestin interfaceRestRequestClient- Parameters:
aHttpMethod- The HTTP-Method for the request.aUrl- TheUrlfrom 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 aHttpMethod.POSTrequest.aRedirectDepth- The redirect depth provides the count of HTTP-Request and HTTP-Response cycles where the response represents a redirect as ofHttpStatusCode.isRedirectStatus(). A value of -1 represents the default behavior, e.g. usingHttpURLConnection's redirection means.aResponseObserver- The listener processing a response targeted at thisRestCallerBuilder.- Returns:
- The
RestCallerBuilderwhich is used by the request.
-
toUrl
protected org.refcodes.net.Url toUrl(org.refcodes.net.Url aUrl)
Hook for sub-classes to modify the request URL.- Parameters:
aUrl- TheUrlfor the request.- Returns:
- The tinkered
Url, by default it returns the providedUrlunmodified.
-
-