Package org.yamcs.client
Class ParameterSubscription
- java.lang.Object
-
- org.yamcs.client.base.AbstractSubscription<SubscribeParametersRequest,SubscribeParametersData>
-
- org.yamcs.client.ParameterSubscription
-
- All Implemented Interfaces:
Future<Void>
,Subscription<SubscribeParametersRequest,SubscribeParametersData>
public class ParameterSubscription extends AbstractSubscription<SubscribeParametersRequest,SubscribeParametersData>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ParameterSubscription.Listener
-
Field Summary
Fields Modifier and Type Field Description protected Set<ParameterSubscription.Listener>
listeners
protected Map<Integer,Yamcs.NamedObjectId>
mapping
-
Fields inherited from class org.yamcs.client.base.AbstractSubscription
clientObserver
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ParameterSubscription(MethodHandler methodHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(List<Yamcs.NamedObjectId> ids)
Extends the ongoing subscription with the provided identifiers.void
addListener(ParameterSubscription.Listener listener)
Pvalue.ParameterValue
get(Yamcs.NamedObjectId id)
Get the latest value for a specific parameter.protected void
processMessage(SubscribeParametersData message)
void
remove(List<Yamcs.NamedObjectId> ids)
Shrinks the ongoing subscription by removing the provided identifiers.-
Methods inherited from class org.yamcs.client.base.AbstractSubscription
addMessageListener, awaitConfirmation, awaitConfirmation, cancel, get, get, getConfirmationFuture, isCancelled, isDone, sendMessage
-
-
-
-
Field Detail
-
listeners
protected Set<ParameterSubscription.Listener> listeners
-
mapping
protected Map<Integer,Yamcs.NamedObjectId> mapping
-
-
Constructor Detail
-
ParameterSubscription
protected ParameterSubscription(MethodHandler methodHandler)
-
-
Method Detail
-
processMessage
protected void processMessage(SubscribeParametersData message)
-
addListener
public void addListener(ParameterSubscription.Listener listener)
-
get
public Pvalue.ParameterValue get(Yamcs.NamedObjectId id)
Get the latest value for a specific parameter. This method looks for the value from a local cache. It does not contact Yamcs.
-
add
public void add(List<Yamcs.NamedObjectId> ids)
Extends the ongoing subscription with the provided identifiers.
-
remove
public void remove(List<Yamcs.NamedObjectId> ids)
Shrinks the ongoing subscription by removing the provided identifiers.
-
-