Class ReplyStream
java.lang.Object
org.hansken.plugin.extraction.runtime.grpc.client.ReplyStream
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(io.grpc.stub.StreamObserver<com.google.protobuf.Any> other) Create a replier which communicates on a givenstream.voidSignal normal completion of the stream.voidSignal erroneous completion of the stream.voidreply(com.google.protobuf.Any message) Send a message over the stream.
-
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 givenstream.- 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:
-
onCompleted
public void onCompleted()Signal normal completion of the stream.- See Also:
-
onError
Signal erroneous completion of the stream.- Parameters:
t- the error cause- See Also:
-