ResponseT - The proto2 message that gRPC will receive as a successful response.public class CallbackStreamObserver<ResponseT extends com.google.protobuf.Message> extends Object implements io.grpc.stub.StreamObserver<ResponseT>
AnyRpcCallback.| Modifier and Type | Method and Description |
|---|---|
static <ResponseT extends com.google.protobuf.Message> |
of(GrpcClientContext clientContext,
AnyRpcCallback<ResponseT> anyRpcCallback)
Returns a
StreamObserver that will convert gRPC responses into calls on the given
anyRpcCallback. |
void |
onCompleted() |
void |
onError(Throwable throwable) |
void |
onNext(ResponseT grpcResponse) |
public static <ResponseT extends com.google.protobuf.Message> CallbackStreamObserver<ResponseT> of(GrpcClientContext clientContext, AnyRpcCallback<ResponseT> anyRpcCallback)
StreamObserver that will convert gRPC responses into calls on the given
anyRpcCallback.clientContext - the context that will be updated with success or failure details when the
RPC completesanyRpcCallback - the callback that will be invoked when the RPC completespublic void onNext(ResponseT grpcResponse)
onNext in interface io.grpc.stub.StreamObserver<ResponseT extends com.google.protobuf.Message>public void onError(Throwable throwable)
onError in interface io.grpc.stub.StreamObserver<ResponseT extends com.google.protobuf.Message>public void onCompleted()
onCompleted in interface io.grpc.stub.StreamObserver<ResponseT extends com.google.protobuf.Message>Copyright © 2022. All rights reserved.