public static final class OrchestrateClient.Builder
extends java.lang.Object
Client instances.
Usage:
Client client = OrchestrateClient.builder("your api key")
.host("https://api.orchestrate.io") // optional
.port(80) // optional
.poolSize(Runtime.getRuntime().availableProcessors()) // optional
.maxPoolSize(15) // optional
.build();
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_HOST
The default host for the Orchestrate.io service.
|
static int |
DEFAULT_PORT
The default port for the Orchestrate.io service.
|
| Modifier and Type | Method and Description |
|---|---|
OrchestrateClient |
build() |
OrchestrateClient.Builder |
host(java.lang.String host)
Set the hostname for the Orchestrate.io service, defaults to
Builder.DEFAULT_HOST. |
OrchestrateClient.Builder |
mapper(JacksonMapper.Builder mapperBuilder)
A
Builder used to build the JacksonMapper to use when
marshalling data to and from the service. |
OrchestrateClient.Builder |
mapper(JacksonMapper mapper)
A
JacksonMapper to use when marshalling data to and from the
service. |
OrchestrateClient.Builder |
mapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
The Jackson JSON
ObjectMapper to use when marshalling data to
and from the service, defaults to JacksonMapper.builder(). |
OrchestrateClient.Builder |
maxPoolSize(int maxPoolSize)
The maximum number of threads to use with the client, defaults to
Integer.MAX_VALUE. |
OrchestrateClient.Builder |
poolSize(int poolSize)
The initial number of threads to use with the client, defaults to
Runtime.availableProcessors(). |
OrchestrateClient.Builder |
port(int port)
Set the port for the Orchestrate.io service, defaults to
Builder.DEFAULT_PORT. |
OrchestrateClient.Builder |
userAgent(java.lang.String userAgent)
Set a custom value to be appended to the User-Agent header being sent
to Orchestrate.
|
OrchestrateClient.Builder |
useSSL(boolean useSSL)
Enable or disable SSL when connecting to the service, this value defaults
to
true. |
public static final java.lang.String DEFAULT_HOST
public static final int DEFAULT_PORT
public OrchestrateClient.Builder host(java.lang.String host)
Builder.DEFAULT_HOST.host - The hostname for the Orchestrate.io service.DEFAULT_HOSTpublic OrchestrateClient.Builder port(int port)
Builder.DEFAULT_PORT.port - The port for the Orchestrate.io service.DEFAULT_PORTpublic OrchestrateClient.Builder poolSize(int poolSize)
Runtime.availableProcessors().poolSize - The size of the thread pool to start with.public OrchestrateClient.Builder maxPoolSize(int maxPoolSize)
Integer.MAX_VALUE.maxPoolSize - The maximum size to grow the thread pool to.public OrchestrateClient.Builder mapper(@NonNull com.fasterxml.jackson.databind.ObjectMapper objectMapper)
ObjectMapper to use when marshalling data to
and from the service, defaults to JacksonMapper.builder().objectMapper - A Jackson JSON ObjectMapper.public OrchestrateClient.Builder mapper(@NonNull JacksonMapper.Builder mapperBuilder)
Builder used to build the JacksonMapper to use when
marshalling data to and from the service.mapperBuilder - A JacksonMapper.Builder.public OrchestrateClient.Builder mapper(@NonNull JacksonMapper mapper)
JacksonMapper to use when marshalling data to and from the
service.mapper - A JacksonMapper.public OrchestrateClient.Builder useSSL(boolean useSSL)
true.useSSL - If true enable SSL when connecting to the service.public OrchestrateClient.Builder userAgent(@NonNull java.lang.String userAgent)
This is useful for custom client implementations or libraries that build on top of the Orchestrate client to help identify usage of those implementations and libraries.
userAgent - The value to append as the "user-agent" request header.public OrchestrateClient build()