public static final class ClientConfiguration.Builder
extends java.lang.Object
ClientConfiguration| Constructor and Description |
|---|
Builder() |
Builder(ClientConfiguration config)
Create a builder that is preconfigured with the given
ClientConfiguration |
| Modifier and Type | Method and Description |
|---|---|
ClientConfiguration |
getConfig() |
java.util.List<RequestProcessor> |
getRequestProcessors() |
ClientConfiguration.Builder |
setExecutor(java.util.concurrent.Executor executor)
Sets the executor the client must use to process requests.
|
ClientConfiguration.Builder |
setRequestProcessors(java.util.List<RequestProcessor> processors) |
ClientConfiguration.Builder |
setStreamingEnabled(boolean enabled)
Sets if streaming (pseudo-push) responses will be requested by the
API client.
|
ClientConfiguration.Builder |
setTracer(Tracer tracer)
Sets the
Tracer for the vapi runtime. |
public Builder()
public Builder(ClientConfiguration config)
ClientConfigurationconfig - can be nullpublic ClientConfiguration.Builder setRequestProcessors(java.util.List<RequestProcessor> processors)
processors - the request processors that will be used by the
client. overrides the previous value. if set no default
authentication processors will be automatically added. if set
to null or not set at all the default
authentication processors will be automatically added.ClientConfiguration.Builderpublic java.util.List<RequestProcessor> getRequestProcessors()
public ClientConfiguration.Builder setExecutor(java.util.concurrent.Executor executor)
executor - executor to be used by the client to process
requests.ClientConfiguration.Builderpublic ClientConfiguration.Builder setStreamingEnabled(boolean enabled)
The default value is true to allow generated binding code and
newly written code using ApiProvider to consume stream APIs.
If there is client code making direct use of ApiProvider that
is not handling MethodResult.getNext() streaming can be
disabled to provide backwards compatibility. Turning off streaming
will not allow consumption of stream data. The client will receive
only the first chunk of stream data or error in such case.
When using generated bindings streaming should be enabled to assure compatibility with new APIs.
Bindings generated with prior versions of the system cannot work with streaming. There may also be other caveats and it is strongly recommended to regenerate the bindings with the latest version instead of switching this compatibility mode.
if - true the client will advertise stream support in
HTTP Accept header otherwise the client will not
advertise stream support.ClientConfiguration.Builder instance.public ClientConfiguration.Builder setTracer(Tracer tracer)
Tracer for the vapi runtime.tracer - the tracer to set.ClientConfiguration.Builder instance.public ClientConfiguration getConfig()
ClientConfiguration