Class BepStreamObserver
- All Implemented Interfaces:
StreamObserver<PublishBuildToolEventStreamRequest>
-
Constructor Summary
ConstructorsConstructorDescriptionBepStreamObserver(org.jetbrains.bsp.bazel.server.bep.BepServer bepServer, StreamObserver<PublishBuildToolEventStreamResponse> responseObserver) -
Method Summary
Modifier and TypeMethodDescriptionvoidReceives a notification of successful stream completion.voidReceives a terminating error from the stream.voidonNext(PublishBuildToolEventStreamRequest request) Receives a value from the stream.
-
Constructor Details
-
BepStreamObserver
public BepStreamObserver(org.jetbrains.bsp.bazel.server.bep.BepServer bepServer, StreamObserver<PublishBuildToolEventStreamResponse> responseObserver)
-
-
Method Details
-
onNext
Description copied from interface:StreamObserverReceives a value from the stream.Can be called many times but is never called after
StreamObserver.onError(Throwable)orStreamObserver.onCompleted()are called.Unary calls must invoke onNext at most once. Clients may invoke onNext at most once for server streaming calls, but may receive many onNext callbacks. Servers may invoke onNext at most once for client streaming calls, but may receive many onNext callbacks.
If an exception is thrown by an implementation the caller is expected to terminate the stream by calling
StreamObserver.onError(Throwable)with the caught exception prior to propagating it.- Specified by:
onNextin interfaceStreamObserver<PublishBuildToolEventStreamRequest>- Parameters:
request- the value passed to the stream
-
onError
Description copied from interface:StreamObserverReceives a terminating error from the stream.May only be called once and if called it must be the last method called. In particular if an exception is thrown by an implementation of
onErrorno further calls to any method are allowed.tshould be aStatusExceptionorStatusRuntimeException, but otherThrowabletypes are possible. Callers should generally convert from aStatusviaStatus.asException()orStatus.asRuntimeException(). Implementations should generally convert to aStatusviaStatus.fromThrowable(Throwable).- Specified by:
onErrorin interfaceStreamObserver<PublishBuildToolEventStreamRequest>- Parameters:
throwable- the error occurred on the stream
-
onCompleted
public void onCompleted()Description copied from interface:StreamObserverReceives a notification of successful stream completion.May only be called once and if called it must be the last method called. In particular if an exception is thrown by an implementation of
onCompletedno further calls to any method are allowed.- Specified by:
onCompletedin interfaceStreamObserver<PublishBuildToolEventStreamRequest>
-