java.lang.Object
org.hansken.plugin.extraction.runtime.grpc.client.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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    init(io.grpc.stub.StreamObserver<com.google.protobuf.Any> other)
    Create a replier which communicates on a given stream.
    void
    Signal normal completion of the stream.
    void
    Signal erroneous completion of the stream.
    void
    reply(com.google.protobuf.Any message)
    Send a message over the stream.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ReplyStream

      public ReplyStream()
  • Method Details

    • 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)