Class NexusServiceStubImpl
java.lang.Object
io.temporal.internal.sync.NexusServiceStubImpl
- All Implemented Interfaces:
NexusServiceStub
-
Constructor Summary
ConstructorsConstructorDescriptionNexusServiceStubImpl(String name, NexusServiceOptions options, WorkflowOutboundCallsInterceptor outboundCallsInterceptor, Functions.Proc1<String> assertReadOnly) -
Method Summary
Modifier and TypeMethodDescription<R> RExecutes an operation by its type name and arguments.<R> RExecutes an operation by its type name and arguments.<R> Promise<R> executeAsync(String operationName, Class<R> resultClass, Object arg) Executes an operation asynchronously by its type name and arguments.<R> Promise<R> executeAsync(String operationName, Class<R> resultClass, Type resultType, Object arg) Executes an operation asynchronously by its type name and arguments.<R> NexusOperationHandle<R> Request to start an operation by its type name and arguments<R> NexusOperationHandle<R> Request to start an operation by its type name and arguments
-
Constructor Details
-
NexusServiceStubImpl
public NexusServiceStubImpl(String name, NexusServiceOptions options, WorkflowOutboundCallsInterceptor outboundCallsInterceptor, Functions.Proc1<String> assertReadOnly)
-
-
Method Details
-
execute
Description copied from interface:NexusServiceStubExecutes an operation by its type name and arguments. Blocks until the operation completion.- Specified by:
executein interfaceNexusServiceStub- Type Parameters:
R- return type.- Parameters:
operationName- name of the operation type to execute.resultClass- the expected return type of the operation.arg- argument of the operation.- Returns:
- an operation result.
-
execute
Description copied from interface:NexusServiceStubExecutes an operation by its type name and arguments. Blocks until the operation completion.- Specified by:
executein interfaceNexusServiceStub- Type Parameters:
R- return type.- Parameters:
operationName- name of the operation type to execute.resultClass- the expected return type of the operation.resultType- the expected return type of the nexus operation. Differs from resultClass for generic types.arg- argument of the operation.- Returns:
- an operation result.
-
executeAsync
Description copied from interface:NexusServiceStubExecutes an operation asynchronously by its type name and arguments.- Specified by:
executeAsyncin interfaceNexusServiceStub- Type Parameters:
R- return type.- Parameters:
operationName- name of an operation type to execute.resultClass- the expected return type of the operation. Use Void.class for operations that return void type.arg- argument of the operation.- Returns:
- Promise to the operation result.
-
executeAsync
public <R> Promise<R> executeAsync(String operationName, Class<R> resultClass, Type resultType, Object arg) Description copied from interface:NexusServiceStubExecutes an operation asynchronously by its type name and arguments.- Specified by:
executeAsyncin interfaceNexusServiceStub- Type Parameters:
R- return type.- Parameters:
operationName- name of an operation type to execute.resultClass- the expected return type of the operation. Use Void.class for operations that return void type.resultType- the expected return type of the nexus operation. Differs from resultClass for generic types.arg- argument of the operation.- Returns:
- Promise to the operation result.
-
start
Description copied from interface:NexusServiceStubRequest to start an operation by its type name and arguments- Specified by:
startin interfaceNexusServiceStub- Type Parameters:
R- return type.- Parameters:
operationName- name of an operation type to execute.resultClass- the expected return type of the operation. Use Void.class for operations that return void type.arg- argument of the operation.- Returns:
- A handle that can be used to wait for the operation to start or wait for it to finish
-
start
public <R> NexusOperationHandle<R> start(String operationName, Class<R> resultClass, Type resultType, Object arg) Description copied from interface:NexusServiceStubRequest to start an operation by its type name and arguments- Specified by:
startin interfaceNexusServiceStub- Type Parameters:
R- return type.- Parameters:
operationName- name of an operation type to execute.resultClass- the expected return type of the operation. Use Void.class for operations that return void type.resultType- the expected return type of the nexus operation. Differs from resultClass for generic types.arg- argument of the operation.- Returns:
- A handle that can be used to wait for the operation to start or wait for it to finish
-
getOptions
- Specified by:
getOptionsin interfaceNexusServiceStub- Returns:
- Options used to create this stub.
-