Interface WorkflowServiceStubs
- All Superinterfaces:
ServiceStubs<WorkflowServiceGrpc.WorkflowServiceBlockingStub,WorkflowServiceGrpc.WorkflowServiceFutureStub>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkflowServiceStubsnewConnectedServiceStubs(WorkflowServiceStubsOptions options, Duration timeout) Creates WorkflowService gRPC stubs and ensures connectivity with the server at the moment of creation.static WorkflowServiceStubsDeprecated.static WorkflowServiceStubsnewInstance(WorkflowServiceGrpc.WorkflowServiceImplBase service, WorkflowServiceStubsOptions options) Deprecated.useInProcessGRPCServerto manage in-memory server and corresponded channel outside the stubs.static WorkflowServiceStubsnewInstance(WorkflowServiceStubsOptions options) static WorkflowServiceStubsCreates WorkflowService gRPC stubs pointed on to the locally running Temporal Server.static WorkflowServiceStubsCreates WorkflowService gRPC stubs.Methods inherited from interface io.temporal.serviceclient.ServiceStubs
awaitTermination, blockingStub, connect, futureStub, getRawChannel, getServerCapabilities, healthCheck, isShutdown, isTerminated, shutdown, shutdownNow
-
Field Details
-
HEALTH_CHECK_SERVICE_NAME
- See Also:
-
-
Method Details
-
newLocalServiceStubs
Creates WorkflowService gRPC stubs pointed on to the locally running Temporal Server. The Server should be available on 127.0.0.1:7233 -
newServiceStubs
Creates WorkflowService gRPC stubs.This method creates stubs with "lazy" connectivity. The connection is not performed during the creation time and happens on the first request.
If you wish to perform a connection in an eager manner, callServiceStubs.connect(Duration)after creation or usenewConnectedServiceStubs(WorkflowServiceStubsOptions, Duration)instead of this method.If the options contain plugins (via
WorkflowServiceStubsOptions.Builder.setPlugins(WorkflowServiceStubsPlugin...)), this method applies them in two phases:- Configuration phase: Each plugin's
configureServiceStubsmethod is called in forward (registration) order to modify the options builder - Connection phase: Each plugin's
connectServiceClientmethod is called in reverse order to wrap the connection (first plugin wraps all others)
Migration Note: This method doesn't respect
WorkflowServiceStubsOptions.Builder.setDisableHealthCheck(boolean),ServiceStubsOptions.Builder.setHealthCheckAttemptTimeout(Duration)(boolean)} andServiceStubsOptions.Builder.setHealthCheckTimeout(Duration)(boolean)}. This method is equivalent toWorkflowServiceStubsOptions.Builder.setDisableHealthCheck(boolean)set.- Parameters:
options- stub options to use
- Configuration phase: Each plugin's
-
newConnectedServiceStubs
static WorkflowServiceStubs newConnectedServiceStubs(WorkflowServiceStubsOptions options, @Nullable Duration timeout) Creates WorkflowService gRPC stubs and ensures connectivity with the server at the moment of creation.See
newServiceStubs(WorkflowServiceStubsOptions)if you prefer a lazy version of this method that doesn't perform an eager connection. This method is functionally equivalent to a sequence ofnewServiceStubs(WorkflowServiceStubsOptions)andServiceStubs.connect(Duration)Migration Note: This method doesn't respect
WorkflowServiceStubsOptions.Builder.setDisableHealthCheck(boolean),ServiceStubsOptions.Builder.setHealthCheckAttemptTimeout(Duration)(boolean)} andServiceStubsOptions.Builder.setHealthCheckTimeout(Duration)(boolean)}. This method is equivalent toWorkflowServiceStubsOptions.Builder.setDisableHealthCheck(boolean)not set.- Parameters:
options- stub options to usetimeout- timeout to use inServiceStubs.connect(Duration)call. If null,options.getRpcTimeout()will be used.
-
newInstance
Deprecated.Create gRPC connection stubs using default options. The options default to the connection to the locally running temporal service. -
newInstance
Deprecated.usenewServiceStubs(WorkflowServiceStubsOptions)ornewConnectedServiceStubs(WorkflowServiceStubsOptions, Duration). UsenewServiceStubs(WorkflowServiceStubsOptions)to get the same behavior as with setWorkflowServiceStubsOptions.Builder.setDisableHealthCheck(boolean)(preferred). UsenewConnectedServiceStubs(WorkflowServiceStubsOptions, Duration)with {ServiceStubsOptions.Builder.setHealthCheckTimeout(Duration)astimeout(null if you didn't specify it).Create gRPC connection stubs using provided options. -
newInstance
@Deprecated static WorkflowServiceStubs newInstance(WorkflowServiceGrpc.WorkflowServiceImplBase service, WorkflowServiceStubsOptions options) Deprecated.useInProcessGRPCServerto manage in-memory server and corresponded channel outside the stubs. Channel provided byInProcessGRPCServershould be supplied intonewInstance(WorkflowServiceStubsOptions)by specifying {ServiceStubsOptions.getChannel()}Create gRPC connection stubs that connect to the provided service implementation using an in-memory channel. Useful for testing, usually with mock and spy services. -
getOptions
WorkflowServiceStubsOptions getOptions()
-
newLocalServiceStubs().