Package org.sdase.commons.client.jersey
Class ClientFactory
- java.lang.Object
-
- org.sdase.commons.client.jersey.ClientFactory
-
public class ClientFactory extends java.lang.Object
AClientFactory
creates Http clients to access services within the SDA Platform or external services.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExternalClientBuilder
externalClient()
Starts creation of a client that calls APIs outside of the SDA SE Platform.ExternalClientBuilder
externalClient(HttpClientConfiguration httpClientConfiguration)
Starts creation of a client that calls APIs outside of the SDA SE Platform.PlatformClientBuilder
platformClient()
Starts creation of a client that calls APIs within the SDA SE Platform.PlatformClientBuilder
platformClient(HttpClientConfiguration httpClientConfiguration)
Starts creation of a client that calls APIs within the SDA SE Platform.
-
-
-
Method Detail
-
platformClient
public PlatformClientBuilder platformClient()
Starts creation of a client that calls APIs within the SDA SE Platform. This clients automatically send aTrace-Token
from the incoming request or a newTrace-Token
to the API resources and can optionally send aConsumer-Token
or pass through theAuthorization
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 aTrace-Token
from the incoming request or a newTrace-Token
to the API resources and can optionally send aConsumer-Token
or pass through theAuthorization
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
-
-