public abstract static class GatewayGrpc.GatewayImplBase extends Object implements io.grpc.BindableService
The Gateway API for evaluating and submitting transactions via the gateway. Transaction evaluation (query) requires the invocation of the Evaluate service Transaction submission (ledger updates) is a two step process invoking Endorse followed by Submit. A third step, invoking CommitStatus, is required if the clients wish to wait for a Transaction to be committed. The proposal and transaction must be signed by the client before each step.
Constructor and Description |
---|
GatewayImplBase() |
Modifier and Type | Method and Description |
---|---|
io.grpc.ServerServiceDefinition |
bindService() |
void |
chaincodeEvents(SignedChaincodeEventsRequest request,
io.grpc.stub.StreamObserver<ChaincodeEventsResponse> responseObserver)
The ChaincodeEvents service supplies a stream of responses, each containing all the events emitted by the
requested chaincode for a specific block.
|
void |
commitStatus(SignedCommitStatusRequest request,
io.grpc.stub.StreamObserver<CommitStatusResponse> responseObserver)
The CommitStatus service will indicate whether a prepared transaction previously submitted to
the Submit service has been committed.
|
void |
endorse(EndorseRequest request,
io.grpc.stub.StreamObserver<EndorseResponse> responseObserver)
The Endorse service passes a proposed transaction to the gateway in order to
obtain sufficient endorsement.
|
void |
evaluate(EvaluateRequest request,
io.grpc.stub.StreamObserver<EvaluateResponse> responseObserver)
The Evaluate service passes a proposed transaction to the gateway in order to invoke the
transaction function and return the result to the client.
|
void |
submit(SubmitRequest request,
io.grpc.stub.StreamObserver<SubmitResponse> responseObserver)
The Submit service will process the prepared transaction returned from Endorse service
once it has been signed by the client.
|
public void endorse(EndorseRequest request, io.grpc.stub.StreamObserver<EndorseResponse> responseObserver)
The Endorse service passes a proposed transaction to the gateway in order to obtain sufficient endorsement. The gateway will determine the endorsement plan for the requested chaincode and forward to the appropriate peers for endorsement. It will return to the client a prepared transaction in the form of an Envelope message as defined in common/common.proto. The client must sign the contents of this envelope before invoking the Submit service.
public void submit(SubmitRequest request, io.grpc.stub.StreamObserver<SubmitResponse> responseObserver)
The Submit service will process the prepared transaction returned from Endorse service once it has been signed by the client. It will wait for the transaction to be submitted to the ordering service but the client must invoke the CommitStatus service to wait for the transaction to be committed.
public void commitStatus(SignedCommitStatusRequest request, io.grpc.stub.StreamObserver<CommitStatusResponse> responseObserver)
The CommitStatus service will indicate whether a prepared transaction previously submitted to the Submit service has been committed. It will wait for the commit to occur if it hasn’t already committed.
public void evaluate(EvaluateRequest request, io.grpc.stub.StreamObserver<EvaluateResponse> responseObserver)
The Evaluate service passes a proposed transaction to the gateway in order to invoke the transaction function and return the result to the client. No ledger updates are made. The gateway will select an appropriate peer to query based on block height and load.
public void chaincodeEvents(SignedChaincodeEventsRequest request, io.grpc.stub.StreamObserver<ChaincodeEventsResponse> responseObserver)
The ChaincodeEvents service supplies a stream of responses, each containing all the events emitted by the requested chaincode for a specific block. The streamed responses are ordered by ascending block number. Responses are only returned for blocks that contain the requested events, while blocks not containing any of the requested events are skipped.
public final io.grpc.ServerServiceDefinition bindService()
bindService
in interface io.grpc.BindableService
Copyright © 2022. All rights reserved.