public final class InvocationConfig
extends java.lang.Object
| Constructor and Description |
|---|
InvocationConfig(ExecutionContext executionContext)
Creates a configuration object which provides an execution context to a
method invocation.
|
| Modifier and Type | Method and Description |
|---|---|
ExecutionContext |
getExecutionContext()
Returns the execution context associated with this configuration.
|
static InvocationConfig |
withReadTimeout(int readTimeout)
Static factory for instances with configured timeout as described in
ExecutionContext.Builder#setReadTimeout for one or more specific invocations. |
static InvocationConfig |
withResponseAccessor(HttpResponseAccessor accessor)
Static factory for instances configured with
HttpResponseAccessor. |
public InvocationConfig(ExecutionContext executionContext)
executionContext - execution context; can be nullpublic ExecutionContext getExecutionContext()
nullpublic static InvocationConfig withReadTimeout(int readTimeout)
ExecutionContext.Builder#setReadTimeout for one or more specific invocations.
Usage:
stub.operation(operationParam, InvocationConfig.readTimeout(1000));
readTimeout - non-negative; a value of zero is interpreted as an
infinite timeoutExecutionContext.Builderpublic static InvocationConfig withResponseAccessor(HttpResponseAccessor accessor)
HttpResponseAccessor.accessor - which will be provided with the raw REST responseExecutionContext.Builder