Class ReplyStream


  • public final class ReplyStream
    extends Object
    A helper class to be used to send messages to the server. This helper class is required because we have to send replies to server requests, which is not supported out of the box by gRPC.
    • Constructor Detail

      • ReplyStream

        public ReplyStream()
    • Method Detail

      • init

        public void init​(io.grpc.stub.StreamObserver<com.google.protobuf.Any> other)
        Create a replier which communicates on a given stream.
        Parameters:
        other - the stream to communicate on
      • reply

        public void reply​(com.google.protobuf.Any message)
        Send a message over the stream.
        Parameters:
        message - the message to send
        See Also:
        StreamObserver.onNext(Object)
      • onCompleted

        public void onCompleted()
        Signal normal completion of the stream.
        See Also:
        StreamObserver.onCompleted()
      • onError

        public void onError​(Throwable t)
        Signal erroneous completion of the stream.
        Parameters:
        t - the error cause
        See Also:
        StreamObserver.onError(Throwable)