public static final class CommandServiceGrpc.CommandServiceStub extends io.grpc.stub.AbstractAsyncStub<CommandServiceGrpc.CommandServiceStub>
Command Service is able to correlate submitted commands with completion data, identify timeouts, and return contextual information with each tracking result. This supports the implementation of stateless clients. Note that submitted commands generally produce completion events as well, even in case a command gets rejected. For example, the participant MAY choose to produce a completion event for a rejection of a duplicate command.
Modifier and Type | Method and Description |
---|---|
protected CommandServiceGrpc.CommandServiceStub |
build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) |
void |
submitAndWait(CommandServiceOuterClass.SubmitAndWaitRequest request,
io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
Submits a single composite command and waits for its result.
|
void |
submitAndWaitForTransaction(CommandServiceOuterClass.SubmitAndWaitRequest request,
io.grpc.stub.StreamObserver<CommandServiceOuterClass.SubmitAndWaitForTransactionResponse> responseObserver)
Submits a single composite command, waits for its result, and returns the transaction.
|
void |
submitAndWaitForTransactionId(CommandServiceOuterClass.SubmitAndWaitRequest request,
io.grpc.stub.StreamObserver<CommandServiceOuterClass.SubmitAndWaitForTransactionIdResponse> responseObserver)
Submits a single composite command, waits for its result, and returns the transaction id.
|
void |
submitAndWaitForTransactionTree(CommandServiceOuterClass.SubmitAndWaitRequest request,
io.grpc.stub.StreamObserver<CommandServiceOuterClass.SubmitAndWaitForTransactionTreeResponse> responseObserver)
Submits a single composite command, waits for its result, and returns the transaction tree.
|
protected CommandServiceGrpc.CommandServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
build
in class io.grpc.stub.AbstractStub<CommandServiceGrpc.CommandServiceStub>
public void submitAndWait(CommandServiceOuterClass.SubmitAndWaitRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
Submits a single composite command and waits for its result. Propagates the gRPC error of failed submissions including Daml interpretation errors. Errors: - ``UNAUTHENTICATED``: if the request does not include a valid access token - ``PERMISSION_DENIED``: if the claims in the token are insufficient to perform a given operation - ``NOT_FOUND``: if the request does not include a valid ledger id or if a resource is missing (e.g. contract key) due to for example contention on resources - ``ALREADY_EXISTS`` if a resource is duplicated (e.g. contract key) - ``INVALID_ARGUMENT``: if the payload is malformed or is missing required fields - ``ABORTED``: if the number of in-flight commands reached the maximum (if a limit is configured) - ``FAILED_PRECONDITION``: on consistency errors (e.g. the contract key has changed since the submission) or if an interpretation error occurred - ``UNAVAILABLE``: if the participant is not yet ready to submit commands or if the service has been shut down. - ``DEADLINE_EXCEEDED``: if the request failed to receive its completion within the predefined timeout.
public void submitAndWaitForTransactionId(CommandServiceOuterClass.SubmitAndWaitRequest request, io.grpc.stub.StreamObserver<CommandServiceOuterClass.SubmitAndWaitForTransactionIdResponse> responseObserver)
Submits a single composite command, waits for its result, and returns the transaction id. Propagates the gRPC error of failed submissions including Daml interpretation errors. Errors: - ``UNAUTHENTICATED``: if the request does not include a valid access token - ``PERMISSION_DENIED``: if the claims in the token are insufficient to perform a given operation - ``NOT_FOUND``: if the request does not include a valid ledger id or if a resource is missing (e.g. contract key) due to for example contention on resources - ``ALREADY_EXISTS`` if a resource is duplicated (e.g. contract key) - ``INVALID_ARGUMENT``: if the payload is malformed or is missing required fields - ``ABORTED``: if the number of in-flight commands reached the maximum (if a limit is configured) - ``FAILED_PRECONDITION``: on consistency errors (e.g. the contract key has changed since the submission) or if an interpretation error occurred - ``UNAVAILABLE``: if the participant is not yet ready to submit commands or if the service has been shut down. - ``DEADLINE_EXCEEDED``: if the request failed to receive its completion within the predefined timeout.
public void submitAndWaitForTransaction(CommandServiceOuterClass.SubmitAndWaitRequest request, io.grpc.stub.StreamObserver<CommandServiceOuterClass.SubmitAndWaitForTransactionResponse> responseObserver)
Submits a single composite command, waits for its result, and returns the transaction. Propagates the gRPC error of failed submissions including Daml interpretation errors. Errors: - ``UNAUTHENTICATED``: if the request does not include a valid access token - ``PERMISSION_DENIED``: if the claims in the token are insufficient to perform a given operation - ``NOT_FOUND``: if the request does not include a valid ledger id or if a resource is missing (e.g. contract key) due to for example contention on resources - ``ALREADY_EXISTS`` if a resource is duplicated (e.g. contract key) - ``INVALID_ARGUMENT``: if the payload is malformed or is missing required fields - ``ABORTED``: if the number of in-flight commands reached the maximum (if a limit is configured) - ``FAILED_PRECONDITION``: on consistency errors (e.g. the contract key has changed since the submission) or if an interpretation error occurred - ``UNAVAILABLE``: if the participant is not yet ready to submit commands or if the service has been shut down. - ``DEADLINE_EXCEEDED``: if the request failed to receive its completion within the predefined timeout.
public void submitAndWaitForTransactionTree(CommandServiceOuterClass.SubmitAndWaitRequest request, io.grpc.stub.StreamObserver<CommandServiceOuterClass.SubmitAndWaitForTransactionTreeResponse> responseObserver)
Submits a single composite command, waits for its result, and returns the transaction tree. Propagates the gRPC error of failed submissions including Daml interpretation errors. Errors: - ``UNAUTHENTICATED``: if the request does not include a valid access token - ``PERMISSION_DENIED``: if the claims in the token are insufficient to perform a given operation - ``NOT_FOUND``: if the request does not include a valid ledger id or if a resource is missing (e.g. contract key) due to for example contention on resources - ``ALREADY_EXISTS`` if a resource is duplicated (e.g. contract key) - ``INVALID_ARGUMENT``: if the payload is malformed or is missing required fields - ``ABORTED``: if the number of in-flight commands reached the maximum (if a limit is configured) - ``FAILED_PRECONDITION``: on consistency errors (e.g. the contract key has changed since the submission) or if an interpretation error occurred - ``UNAVAILABLE``: if the participant is not yet ready to submit commands or if the service has been shut down. - ``DEADLINE_EXCEEDED``: if the request failed to receive its completion within the predefined timeout.