public static class ExecutionContext.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ExecutionContext |
build() |
static ExecutionContext.Builder |
from(ExecutionContext ec)
Initializes the builder with existing
ExecutionContext data. |
ExecutionContext.Builder |
mergeApplicationData(java.util.Map<java.lang.String,java.lang.String> data)
Add multiple entries to
ExecutionContext.ApplicationData . |
ExecutionContext.Builder |
mergeApplicationData(java.lang.String key,
java.lang.String value)
Add setting to
ExecutionContext.ApplicationData . |
ExecutionContext.Builder |
setApplicationData(ExecutionContext.ApplicationData applicationData) |
ExecutionContext.Builder |
setReadTimeout(java.lang.Integer readTimeout)
Sets the amount of time in milliseconds the client will wait for a
response from the server before timing out.
|
ExecutionContext.Builder |
setResponseAccessor(HttpResponseAccessor responseAccessor)
Sets a
HttpResponseAccessor instance which can access and
capture information from the raw REST response. |
ExecutionContext.Builder |
setSecurityContext(ExecutionContext.SecurityContext securityContext) |
public static ExecutionContext.Builder from(ExecutionContext ec)
ExecutionContext
data.
This allows to update one or more settings.ec
- instance to be copied; If null
blank fields will be
used as starting pointpublic ExecutionContext.Builder setApplicationData(ExecutionContext.ApplicationData applicationData)
applicationData
- can be null
public ExecutionContext.Builder mergeApplicationData(java.lang.String key, java.lang.String value)
ExecutionContext.ApplicationData
. If ExecutionContext.ApplicationData
is
null
new instance will be created. If the key
exists
it will be replaced.key
- data keyvalue
- data valueExecutionContext.Builder
instancepublic ExecutionContext.Builder mergeApplicationData(java.util.Map<java.lang.String,java.lang.String> data)
ExecutionContext.ApplicationData
. If
ExecutionContext.ApplicationData
is null
new instance will be created.
Existing keys will be replaces (or values for existing keys)data
- valuesExecutionContext.Builder
instancepublic ExecutionContext.Builder setSecurityContext(ExecutionContext.SecurityContext securityContext)
securityContext
- can be null
public ExecutionContext.Builder setReadTimeout(java.lang.Integer readTimeout)
For the HTTP 1.1 transport protocol this value maps to the
SO_TIMEOUT
.
If not null
, this property overrides the one read from
HttpConfiguration.getSoTimeout()
.
The default value is null
.
A value of zero is interpreted as an infinite timeout, null
is interpreted as unspecified at this level (concrete invocation) and
client-level configuration applies.
readTimeout
- non-negative value or null
public ExecutionContext.Builder setResponseAccessor(HttpResponseAccessor responseAccessor)
HttpResponseAccessor
instance which can access and
capture information from the raw REST response.
This accessor is only applicable for requests executed from a client that uses REST transport.
responseAccessor
- which will be provided with the raw REST
responsepublic ExecutionContext build()