Package com.microsoft.durabletask
Class DurableTaskGrpcClientBuilder
- java.lang.Object
-
- com.microsoft.durabletask.DurableTaskGrpcClientBuilder
-
public final class DurableTaskGrpcClientBuilder extends java.lang.ObjectBuilder class for constructing newDurableTaskClientobjects that communicate with a sidecar process over gRPC.
-
-
Constructor Summary
Constructors Constructor Description DurableTaskGrpcClientBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DurableTaskClientbuild()Initializes a newDurableTaskClientobject with the settings specified in the current builder object.DurableTaskGrpcClientBuilderdataConverter(DataConverter dataConverter)Sets theDataConverterto use for converting serializable data payloads.DurableTaskGrpcClientBuildergrpcChannel(io.grpc.Channel channel)Sets the gRPC channel to use for communicating with the sidecar process.DurableTaskGrpcClientBuilderport(int port)Sets the gRPC endpoint port to connect to.
-
-
-
Method Detail
-
dataConverter
public DurableTaskGrpcClientBuilder dataConverter(DataConverter dataConverter)
Sets theDataConverterto use for converting serializable data payloads.- Parameters:
dataConverter- theDataConverterto use for converting serializable data payloads- Returns:
- this builder object
-
grpcChannel
public DurableTaskGrpcClientBuilder grpcChannel(io.grpc.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:
channel- the gRPC channel to use- Returns:
- this builder object
-
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:
port- the gRPC endpoint port to connect to- Returns:
- this builder object
-
build
public DurableTaskClient build()
Initializes a newDurableTaskClientobject with the settings specified in the current builder object.- Returns:
- a new
DurableTaskClientobject
-
-