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.net.OauthTokenAccessor, org.refcodes.net.OauthTokenAccessor.OauthTokenBuilder<org.refcodes.net.HttpClientContext>, org.refcodes.net.OauthTokenAccessor.OauthTokenMutator, org.refcodes.net.OauthTokenAccessor.OauthTokenProperty, 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 a RestClient to be capable of providing a User-Agent with UserAgentAccessor.UserAgentMutator.setUserAgent(String) (withUserAgent(String)) and to be capable of using base URLs to be set with BaseUrlAccessor.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) or open(HttpClientContext). A HttpRestClient can be shutdown via Closable.close().
    • Method Detail

      • open

        default void open​()
                   throws org.refcodes.component.OpenException
        Specified by:
        open in interface org.refcodes.component.Openable
        Throws:
        org.refcodes.component.OpenException
      • open

        default void open​(org.refcodes.net.HttpClientContext aCtx)
                   throws org.refcodes.component.OpenException
        Specified by:
        open in interface org.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.OpenException
        Configures the HTTPS client connection with the provided configuration parameters.
        Parameters:
        aBaseUrl - The base Url to 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.OpenException
        Configures the HTTPS client connection with the provided configuration parameters.
        Parameters:
        aStoreDescriptor - The TrustStoreDescriptor pointing to your KeyStore.
        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.OpenException
        Configures the HTTPS client connection with the provided configuration parameters.
        Parameters:
        aBaseUrl - The base Url to be used.
        aStoreDescriptor - The TrustStoreDescriptor pointing to your KeyStore.
        Throws:
        org.refcodes.component.OpenException - thrown in case something went wrong.
      • withDisableRequestCorrelation

        default HttpRestClient withDisableRequestCorrelation​()
        Specified by:
        withDisableRequestCorrelation in interface org.refcodes.runtime.RequestCorrelation<org.refcodes.net.HttpClientContext>
        Specified by:
        withDisableRequestCorrelation in interface RestClient
      • withDisableSessionCorrelation

        default HttpRestClient withDisableSessionCorrelation​()
        Specified by:
        withDisableSessionCorrelation in interface RestClient
        Specified by:
        withDisableSessionCorrelation in interface org.refcodes.runtime.SessionCorrelation<org.refcodes.net.HttpClientContext>
      • withEnableRequestCorrelation

        default HttpRestClient withEnableRequestCorrelation​()
        Specified by:
        withEnableRequestCorrelation in interface org.refcodes.runtime.RequestCorrelation<org.refcodes.net.HttpClientContext>
        Specified by:
        withEnableRequestCorrelation in interface RestClient
      • withEnableSessionCorrelation

        default HttpRestClient withEnableSessionCorrelation​()
        Specified by:
        withEnableSessionCorrelation in interface RestClient
        Specified by:
        withEnableSessionCorrelation in interface org.refcodes.runtime.SessionCorrelation<org.refcodes.net.HttpClientContext>
      • withRequestCorrelation

        default HttpRestClient withRequestCorrelation​(boolean hasRequestCorrelation)
        Specified by:
        withRequestCorrelation in interface org.refcodes.runtime.RequestCorrelation<org.refcodes.net.HttpClientContext>
        Specified by:
        withRequestCorrelation in interface RestClient
      • withSessionCorrelation

        default HttpRestClient withSessionCorrelation​(boolean hasSessionCorrelation)
        Specified by:
        withSessionCorrelation in interface RestClient
        Specified by:
        withSessionCorrelation in interface org.refcodes.runtime.SessionCorrelation<org.refcodes.net.HttpClientContext>
      • withTrustStoreDescriptor

        default HttpRestClient withTrustStoreDescriptor​(org.refcodes.security.TrustStoreDescriptor aStoreDescriptor)
        Specified by:
        withTrustStoreDescriptor in interface org.refcodes.security.TrustStoreDescriptorAccessor.TrustStoreDescriptorBuilder<HttpRestClient>
      • withUserAgent

        default HttpRestClient withUserAgent​(String aUserAgent)
        Specified by:
        withUserAgent in interface RestClient
        Specified by:
        withUserAgent in interface org.refcodes.net.UserAgentAccessor.UserAgentBuilder<org.refcodes.net.HttpClientContext>