DurableTaskGrpcClientBuilder Class
- java.
lang. Object - com.
microsoft. durabletask. DurableTaskGrpcClientBuilder
- com.
public final class DurableTaskGrpcClientBuilder
Builder class for constructing new DurableTaskClient objects that communicate with a sidecar process over gRPC.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| DurableTaskGrpcClientBuilder() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Durable |
build()
Initializes a new DurableTaskClient 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
DurableTaskGrpcClientBuilder
public DurableTaskGrpcClientBuilder()
Method Details
build
public DurableTaskClient build()
Initializes a new DurableTaskClient object with the settings specified in the current builder object.
Returns:
dataConverter
public DurableTaskGrpcClientBuilder dataConverter(DataConverter dataConverter)
Sets the DataConverter to use for converting serializable data payloads.
Parameters:
Returns:
grpcChannel
public DurableTaskGrpcClientBuilder 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 client is closed. Rather, the caller remains responsible for shutting down the channel after disposing the client.
If not specified, a gRPC channel will be created automatically for each constructed DurableTaskClient.
Parameters:
Returns:
port
public DurableTaskGrpcClientBuilder 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: