Package org.yamcs.api
Interface Observer<T>
- All Known Subinterfaces:
DataObserver<T>
- All Known Implementing Classes:
CallObserver,ClientStreamingObserver,ParseFilterObserver,ResponseObserver,ServerStreamingObserver,SubscribeEventsObserver,SubscribeParameterObserver,WebSocketObserver
public interface Observer<T>
-
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()Mark the successful end.default voidShortcut for:voidComplete with an exception.default booleanReturns whether this call has been cancelled by the remote peervoidEmit the next message.default voidsetCancelHandler(Runnable cancelHandler) Set aRunnablethat will be called when the call is cancelled.
-
Method Details
-
next
Emit the next message. -
completeExceptionally
Complete with an exception. -
complete
void complete()Mark the successful end. -
complete
Shortcut for:next(message); complete();
-
isCancelled
default boolean isCancelled()Returns whether this call has been cancelled by the remote peer -
setCancelHandler
Set aRunnablethat will be called when the call is cancelled. (example: peer disconnect)
-