Class NexusClientImpl
java.lang.Object
io.temporal.client.NexusClientImpl
- All Implemented Interfaces:
NexusClient
-
Method Summary
Modifier and TypeMethodDescriptionReturns the count of standalone Nexus operation executions matching the given visibility query, optionally with aggregation groups.Returns an untyped handle to an existing operation execution, optionally pinned to a specific run.<R> NexusOperationHandle<R> Returns a typed handle to an existing operation execution, bound toresultClass.<R> NexusOperationHandle<R> Returns a typed handle to an existing operation execution, bound toresultClass/resultType.io.temporal.serviceclient.WorkflowServiceStubsReturns the underlying gRPC stubs this client routes RPCs through.Returns a stream of standalone Nexus operation executions matching the given visibility query.static NexusClientnewInstance(io.temporal.serviceclient.WorkflowServiceStubs service, NexusClientOptions options) <T> NexusServiceClient<T> newNexusServiceClient(Class<T> service, String endpoint) Builds a typed service-bound client targeting the given endpoint, dispatching operations by method reference on the@ServiceInterface-annotatedservice.newUntypedNexusServiceClient(String endpoint, String serviceName) Builds an untyped service-bound client targeting the given endpoint and service.
-
Method Details
-
newInstance
public static NexusClient newInstance(io.temporal.serviceclient.WorkflowServiceStubs service, NexusClientOptions options) -
getWorkflowServiceStubs
public io.temporal.serviceclient.WorkflowServiceStubs getWorkflowServiceStubs()Description copied from interface:NexusClientReturns the underlying gRPC stubs this client routes RPCs through.- Specified by:
getWorkflowServiceStubsin interfaceNexusClient
-
getHandle
Description copied from interface:NexusClientReturns an untyped handle to an existing operation execution, optionally pinned to a specific run.- Specified by:
getHandlein interfaceNexusClient- Parameters:
operationId- the user-assigned operation IDrunId- the server-assigned run ID, ornullto target the latest run- Returns:
- an untyped handle
-
getHandle
public <R> NexusOperationHandle<R> getHandle(String operationId, @Nullable String runId, Class<R> resultClass) Description copied from interface:NexusClientReturns a typed handle to an existing operation execution, bound toresultClass.- Specified by:
getHandlein interfaceNexusClient- Type Parameters:
R- result type- Parameters:
operationId- the user-assigned operation IDrunId- the server-assigned run ID, ornullto target the latest runresultClass- expected result type
-
getHandle
public <R> NexusOperationHandle<R> getHandle(String operationId, @Nullable String runId, Class<R> resultClass, @Nullable Type resultType) Description copied from interface:NexusClientReturns a typed handle to an existing operation execution, bound toresultClass/resultType. Use theresultTypevariant when the result is a generic type whose parameters cannot be captured byClassalone (e.g.List<String>).- Specified by:
getHandlein interfaceNexusClient- Type Parameters:
R- result type- Parameters:
operationId- the user-assigned operation IDrunId- the server-assigned run ID, ornullto target the latest runresultClass- expected result classresultType- generic type for deserialization; may benull
-
newNexusServiceClient
Description copied from interface:NexusClientBuilds a typed service-bound client targeting the given endpoint, dispatching operations by method reference on the@ServiceInterface-annotatedservice. Reuses this client's stubs, options, and interceptor chain.- Specified by:
newNexusServiceClientin interfaceNexusClient- Type Parameters:
T- the service interface type- Parameters:
service- the@ServiceInterface-annotated service typeendpoint- Nexus endpoint name registered on the Temporal Service
-
newUntypedNexusServiceClient
Description copied from interface:NexusClientBuilds an untyped service-bound client targeting the given endpoint and service. Use this to dispatch operations by name string when no service interface is available.- Specified by:
newUntypedNexusServiceClientin interfaceNexusClient- Parameters:
endpoint- Nexus endpoint name registered on the Temporal ServiceserviceName- Nexus service name on that endpoint
-
listNexusOperationExecutions
Description copied from interface:NexusClientReturns a stream of standalone Nexus operation executions matching the given visibility query. The stream paginates lazily over server-side results — pages are fetched on demand as the stream is consumed.- Specified by:
listNexusOperationExecutionsin interfaceNexusClient- Parameters:
query- Temporal visibility query string, ornullto return all executions in the client namespace- Returns:
- a lazy stream of matching executions
-
countNexusOperationExecutions
Description copied from interface:NexusClientReturns the count of standalone Nexus operation executions matching the given visibility query, optionally with aggregation groups.- Specified by:
countNexusOperationExecutionsin interfaceNexusClient- Parameters:
query- Temporal visibility query string, ornullto count all executions in the client namespace- Returns:
- execution count, optionally with aggregation groups when the query uses
GROUP BY
-