Interface Subscription<C extends com.google.protobuf.Message,S extends com.google.protobuf.Message>
- Type Parameters:
C- The client message
S- The server message
- All Known Implementing Classes:
public interface Subscription<C extends com.google.protobuf.Message,S extends com.google.protobuf.Message> extends Future<Void>Top-level interface for any topic subscriptions to Yamcs that make use of the WebSocket API.
Topics are capable of bi-directional communication, where each topic has only a single client and server message type. In practice most topics are one-directional, with the client issuing a single subscription request.
A topic subscription is usually long-running. The server keeps pushing updates until the client cancels the call, or closes the connection. Instances of this class are also futures covering the lifecycle of the call (or any error replies to sent message).
This base class adds general listener support for receiving the unprocessed data messages. Specific implementations of this class sometimes add more customized functionalities, such as polling or processing.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
addMessageListener(MessageListener<S> listener)Get updated on received server messages.
sendMessage(C message)Sends a message to Yamcs.