Class UpstreamAwareStreamObserver<ResT>
java.lang.Object
org.axonframework.axonserver.connector.util.UpstreamAwareStreamObserver<ResT>
- Type Parameters:
ResT- the type of response sent by the server
- All Implemented Interfaces:
io.grpc.stub.ClientResponseObserver<Object,,ResT> io.grpc.stub.StreamObserver<ResT>
public abstract class UpstreamAwareStreamObserver<ResT>
extends Object
implements io.grpc.stub.ClientResponseObserver<Object,ResT>
Convenience implementation of a StreamObserver that provides access to the request stream, which allows cancellation
of the call, flow control, etc.
- Since:
- 4.2
- Author:
- Allard Buijze
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeStart(io.grpc.stub.ClientCallStreamObserver<Object> requestStream) protected voidCompletes the request steam related to this stream observer.io.grpc.stub.ClientCallStreamObserver<?> Returns the request stream observer which allows interaction with the client stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.grpc.stub.StreamObserver
onCompleted, onError, onNext
-
Constructor Details
-
UpstreamAwareStreamObserver
public UpstreamAwareStreamObserver()
-
-
Method Details
-
beforeStart
-
getRequestStream
public io.grpc.stub.ClientCallStreamObserver<?> getRequestStream()Returns the request stream observer which allows interaction with the client stream.- Returns:
- the request stream observer which allows interaction with the client stream
-
completeRequestStream
protected void completeRequestStream()Completes the request steam related to this stream observer. Ignores exceptions that may occur (for instance if the request stream is already half-closed).
-