Package org.refcodes.rest
Interface HttpRestClient
-
- All Superinterfaces:
org.refcodes.net.BaseUrlAccessor,org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>,org.refcodes.net.BaseUrlAccessor.BaseUrlMutator,org.refcodes.net.BaseUrlAccessor.BaseUrlProperty,org.refcodes.component.Closable,org.refcodes.component.ConnectionComponent<org.refcodes.net.HttpClientContext>,org.refcodes.component.ConnectionOpenable<org.refcodes.net.HttpClientContext>,org.refcodes.component.ConnectionStatusAccessor,org.refcodes.component.LinkComponent,org.refcodes.net.MediaTypeFactoryLookup,org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup,org.refcodes.component.Openable,org.refcodes.runtime.RequestCorrelation<org.refcodes.net.HttpClientContext>,RestClient,RestDeleteClient,RestGetClient,RestPostClient,RestPutClient,RestRequestClient,org.refcodes.runtime.SessionCorrelation<org.refcodes.net.HttpClientContext>,org.refcodes.security.TrustStoreDescriptorAccessor,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<HttpRestClient>,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorMutator,org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty,org.refcodes.net.UserAgentAccessor,org.refcodes.net.UserAgentAccessor.UserAgentBuilder<org.refcodes.net.HttpClientContext>,org.refcodes.net.UserAgentAccessor.UserAgentMutator,org.refcodes.net.UserAgentAccessor.UserAgentProperty
- All Known Subinterfaces:
HttpDiscoveryRestClient<B>
- All Known Implementing Classes:
AbstractHttpDiscoveryRestClientDecorator,AbstractHttpRestClientDecorator,HttpRestClientImpl,HttpRestClientSingleton
public interface HttpRestClient extends org.refcodes.component.ConnectionStatusAccessor, org.refcodes.component.ConnectionComponent<org.refcodes.net.HttpClientContext>, RestClient, org.refcodes.component.LinkComponent, org.refcodes.net.BaseUrlAccessor.BaseUrlProperty, org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder<HttpRestClient>, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorProperty, org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<HttpRestClient>
Extends aRestClientto be capable of providing a User-Agent withUserAgentAccessor.UserAgentMutator.setUserAgent(String)(withUserAgent(String)) and to be capable of using base URLs to be set withBaseUrlAccessor.BaseUrlMutator.setBaseUrl(String)(BaseUrlAccessor.BaseUrlBuilder.withBaseUrl(String)). This type is intended to be used by different separate hierarchy branches by providing the generic type <B>, ensuring a coherent type hierarchy for each branch. To prepare HTTPS connections, use the methods such as:open(Url, TrustStoreDescriptor)oropen(HttpClientContext). AHttpRestClientcan be shutdown viaClosable.close().
-
-
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 Modifier and Type Field Description static java.lang.StringDEFAULT_KEYSTORE_TYPEstatic java.lang.StringDEFAULT_SSL_PROTOCOL
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidopen()default voidopen(org.refcodes.net.HttpClientContext aCtx)default voidopen(org.refcodes.net.Url aBaseUrl)Configures the HTTPS client connection with the provided configuration parameters.voidopen(org.refcodes.net.Url aBaseUrl, org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)Configures the HTTPS client connection with the provided configuration parameters.default voidopen(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)Configures the HTTPS client connection with the provided configuration parameters.default HttpRestClientwithDisableRequestCorrelation()default HttpRestClientwithDisableSessionCorrelation()default HttpRestClientwithEnableRequestCorrelation()default HttpRestClientwithEnableSessionCorrelation()default HttpRestClientwithRequestCorrelation(boolean hasRequestCorrelation)default HttpRestClientwithSessionCorrelation(boolean hasSessionCorrelation)default HttpRestClientwithTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)default HttpRestClientwithUserAgent(java.lang.String aUserAgent)-
Methods inherited from interface org.refcodes.net.BaseUrlAccessor.BaseUrlBuilder
withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl, withBaseUrl
-
Methods inherited from interface org.refcodes.net.BaseUrlAccessor.BaseUrlMutator
setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl, setBaseUrl
-
Methods inherited from interface org.refcodes.component.Closable
close, closeIn, closeQuietly, closeUnchecked
-
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isConnectionOpened
-
Methods inherited from interface org.refcodes.net.MediaTypeFactoryLookup
getFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactory
-
Methods inherited from interface org.refcodes.net.MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
addMediaTypeFactory
-
Methods inherited from interface org.refcodes.runtime.RequestCorrelation
disableRequestCorrelation, enableRequestCorrelation, hasRequestCorrelation, setRequestCorrelation
-
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, 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, doRequest, doRequest
-
Methods inherited from interface org.refcodes.runtime.SessionCorrelation
disableSessionCorrelation, enableSessionCorrelation, hasSessionCorrelation, setSessionCorrelation
-
Methods inherited from interface org.refcodes.security.TrustStoreDescriptorAccessor
getTrustStoreDescriptor
-
-
-
-
Field Detail
-
DEFAULT_SSL_PROTOCOL
static final java.lang.String DEFAULT_SSL_PROTOCOL
- See Also:
- Constant Field Values
-
DEFAULT_KEYSTORE_TYPE
static final java.lang.String DEFAULT_KEYSTORE_TYPE
-
-
Method Detail
-
open
default void open() throws org.refcodes.component.OpenException- Specified by:
openin interfaceorg.refcodes.component.Openable- Throws:
org.refcodes.component.OpenException
-
open
default void open(org.refcodes.net.HttpClientContext aCtx) throws org.refcodes.component.OpenException- Specified by:
openin interfaceorg.refcodes.component.ConnectionOpenable<org.refcodes.net.HttpClientContext>- Throws:
org.refcodes.component.OpenException
-
open
default void open(org.refcodes.net.Url aBaseUrl) throws org.refcodes.component.OpenExceptionConfigures the HTTPS client connection with the provided configuration parameters.- Parameters:
aBaseUrl- The baseUrlto be used.- Throws:
org.refcodes.component.OpenException- thrown in case something went wrong.
-
open
default void open(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor) throws org.refcodes.component.OpenExceptionConfigures the HTTPS client connection with the provided configuration parameters.- Parameters:
aStoreDescriptor- TheTrustStoreDescriptorpointing to yourKeyStore.- Throws:
org.refcodes.component.OpenException- thrown in case something went wrong.
-
open
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.- Parameters:
aBaseUrl- The baseUrlto be used.aStoreDescriptor- TheTrustStoreDescriptorpointing to yourKeyStore.- Throws:
org.refcodes.component.OpenException- thrown in case something went wrong.
-
withDisableRequestCorrelation
default HttpRestClient withDisableRequestCorrelation()
- Specified by:
withDisableRequestCorrelationin interfaceorg.refcodes.runtime.RequestCorrelation<org.refcodes.net.HttpClientContext>- Specified by:
withDisableRequestCorrelationin interfaceRestClient
-
withDisableSessionCorrelation
default HttpRestClient withDisableSessionCorrelation()
- Specified by:
withDisableSessionCorrelationin interfaceRestClient- Specified by:
withDisableSessionCorrelationin interfaceorg.refcodes.runtime.SessionCorrelation<org.refcodes.net.HttpClientContext>
-
withEnableRequestCorrelation
default HttpRestClient withEnableRequestCorrelation()
- Specified by:
withEnableRequestCorrelationin interfaceorg.refcodes.runtime.RequestCorrelation<org.refcodes.net.HttpClientContext>- Specified by:
withEnableRequestCorrelationin interfaceRestClient
-
withEnableSessionCorrelation
default HttpRestClient withEnableSessionCorrelation()
- Specified by:
withEnableSessionCorrelationin interfaceRestClient- Specified by:
withEnableSessionCorrelationin interfaceorg.refcodes.runtime.SessionCorrelation<org.refcodes.net.HttpClientContext>
-
withRequestCorrelation
default HttpRestClient withRequestCorrelation(boolean hasRequestCorrelation)
- Specified by:
withRequestCorrelationin interfaceorg.refcodes.runtime.RequestCorrelation<org.refcodes.net.HttpClientContext>- Specified by:
withRequestCorrelationin interfaceRestClient
-
withSessionCorrelation
default HttpRestClient withSessionCorrelation(boolean hasSessionCorrelation)
- Specified by:
withSessionCorrelationin interfaceRestClient- Specified by:
withSessionCorrelationin interfaceorg.refcodes.runtime.SessionCorrelation<org.refcodes.net.HttpClientContext>
-
withTrustStoreDescriptor
default HttpRestClient withTrustStoreDescriptor(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
- Specified by:
withTrustStoreDescriptorin interfaceorg.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<HttpRestClient>
-
withUserAgent
default HttpRestClient withUserAgent(java.lang.String aUserAgent)
- Specified by:
withUserAgentin interfaceRestClient- Specified by:
withUserAgentin interfaceorg.refcodes.net.UserAgentAccessor.UserAgentBuilder<org.refcodes.net.HttpClientContext>
-
-