DurableTaskGrpcWorkerBuilder Class
- java.
lang. Object - com.
microsoft. durabletask. DurableTaskGrpcWorkerBuilder
- com.
public final class DurableTaskGrpcWorkerBuilder
Builder object for constructing customized DurableTaskGrpcWorker instances.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| DurableTaskGrpcWorkerBuilder() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Durable |
addActivity(TaskActivityFactory factory)
Adds an activity factory to be used by the constructed DurableTaskGrpcWorker. |
|
Durable |
addOrchestration(TaskOrchestrationFactory factory)
Adds an orchestration factory to be used by the constructed DurableTaskGrpcWorker. |
|
Durable |
build()
Initializes a new DurableTaskGrpcWorker object with the settings specified in the current builder object. |
|
Durable |
dataConverter(DataConverter dataConverter)
Sets the DataConverter to use for converting serializable data payloads. |
|
Durable |
grpcChannel(Channel channel)
Sets the gRPC channel to use for communicating with the sidecar process. |
|
Durable |
port(int port)
Sets the gRPC endpoint port to connect to. |
Methods inherited from java.lang.Object
Constructor Details
DurableTaskGrpcWorkerBuilder
public DurableTaskGrpcWorkerBuilder()
Method Details
addActivity
public DurableTaskGrpcWorkerBuilder addActivity(TaskActivityFactory factory)
Adds an activity factory to be used by the constructed DurableTaskGrpcWorker.
Parameters:
Returns:
addOrchestration
public DurableTaskGrpcWorkerBuilder addOrchestration(TaskOrchestrationFactory factory)
Adds an orchestration factory to be used by the constructed DurableTaskGrpcWorker.
Parameters:
Returns:
build
public DurableTaskGrpcWorker build()
Initializes a new DurableTaskGrpcWorker object with the settings specified in the current builder object.
Returns:
dataConverter
public DurableTaskGrpcWorkerBuilder dataConverter(DataConverter dataConverter)
Sets the DataConverter to use for converting serializable data payloads.
Parameters:
Returns:
grpcChannel
public DurableTaskGrpcWorkerBuilder grpcChannel(Channel channel)
Sets the gRPC channel to use for communicating with the sidecar process.
This builder method allows you to provide your own gRPC channel for communicating with the Durable Task sidecar endpoint. Channels provided using this method won't be closed when the worker is closed. Rather, the caller remains responsible for shutting down the channel after disposing the worker.
If not specified, a gRPC channel will be created automatically for each constructed DurableTaskGrpcWorker.
Parameters:
Returns:
port
public DurableTaskGrpcWorkerBuilder port(int port)
Sets the gRPC endpoint port to connect to. If not specified, the default Durable Task port number will be used.
Parameters:
Returns: