Class ClientFactory


  • public class ClientFactory
    extends java.lang.Object
    A ClientFactory creates Http clients to access services within the SDA Platform or external services.
    • Method Detail

      • platformClient

        public PlatformClientBuilder platformClient()
        Starts creation of a client that calls APIs within the SDA SE Platform. This clients automatically send a Trace-Token from the incoming request or a new Trace-Token to the API resources and can optionally send a Consumer-Token or pass through the Authorization header from the incoming request.

        The client is using gzip compression.

        Returns:
        a builder to configure the client
      • platformClient

        public PlatformClientBuilder platformClient​(HttpClientConfiguration httpClientConfiguration)
        Starts creation of a client that calls APIs within the SDA SE Platform. This clients automatically send a Trace-Token from the incoming request or a new Trace-Token to the API resources and can optionally send a Consumer-Token or pass through the Authorization header from the incoming request.
        Parameters:
        httpClientConfiguration - Allows to pass additional configuration for the http client.
        Returns:
        a builder to configure the client
      • externalClient

        public ExternalClientBuilder externalClient()
        Starts creation of a client that calls APIs outside of the SDA SE Platform. This clients does no header magic.

        The client is using gzip compression.

        Returns:
        a builder to configure the client
      • externalClient

        public ExternalClientBuilder externalClient​(HttpClientConfiguration httpClientConfiguration)
        Starts creation of a client that calls APIs outside of the SDA SE Platform. This clients does no header magic.
        Parameters:
        httpClientConfiguration - Allows to pass additional configuration for the http client.
        Returns:
        a builder to configure the client