Package org.yamcs.api
Interface Observer<T>
-
public interface Observer<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcomplete()Mark the successful end.default voidcomplete(T message)Shortcut for:voidcompleteExceptionally(Throwable t)Complete with an exception.default booleanisCancelled()Returns whether this call has been cancelled by the remote peervoidnext(T message)Emit the next message.default voidsetCancelHandler(Runnable cancelHandler)Set aRunnablethat will be called when the call is cancelled.
-
-
-
Method Detail
-
next
void next(T message)
Emit the next message.
-
completeExceptionally
void completeExceptionally(Throwable t)
Complete with an exception.
-
complete
void complete()
Mark the successful end.
-
complete
default void complete(T message)
Shortcut for:next(message); complete();
-
isCancelled
default boolean isCancelled()
Returns whether this call has been cancelled by the remote peer
-
-