Package org.yamcs.client
Class TimeSubscription
- java.lang.Object
-
- org.yamcs.client.base.AbstractSubscription<SubscribeTimeRequest,com.google.protobuf.Timestamp>
-
- org.yamcs.client.TimeSubscription
-
- All Implemented Interfaces:
Future<Void>
,Subscription<SubscribeTimeRequest,com.google.protobuf.Timestamp>
public class TimeSubscription extends AbstractSubscription<SubscribeTimeRequest,com.google.protobuf.Timestamp>
Subscription for receiving time updates.
-
-
Field Summary
-
Fields inherited from class org.yamcs.client.base.AbstractSubscription
clientObserver
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TimeSubscription(MethodHandler methodHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(TimeListener listener)
Instant
getCurrent()
Returns the value of the latest received timestamp.void
removeListener(TimeListener listener)
-
Methods inherited from class org.yamcs.client.base.AbstractSubscription
addMessageListener, awaitConfirmation, awaitConfirmation, cancel, get, get, getConfirmationFuture, isCancelled, isDone, sendMessage
-
-
-
-
Constructor Detail
-
TimeSubscription
protected TimeSubscription(MethodHandler methodHandler)
-
-
Method Detail
-
addListener
public void addListener(TimeListener listener)
-
removeListener
public void removeListener(TimeListener listener)
-
getCurrent
public Instant getCurrent()
Returns the value of the latest received timestamp.
-
-