java.lang.Object
org.yamcs.tests.ParameterCaptor
Utility class for queueing parameter deliveries as they are received from a subscription to Yamcs. This is intended
for use in unit tests only.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()List<org.yamcs.protobuf.Pvalue.ParameterValue>Returns the next delivery.org.yamcs.protobuf.Yamcs.NamedObjectIdintReturns the number of unprocessed value deliveries.booleanisEmpty()Returns true if there are not currently any unprocessed deliveries.static ParameterCaptorof(org.yamcs.client.ParameterSubscription subscription) List<org.yamcs.protobuf.Pvalue.ParameterValue>poll()Returns the next delivery.List<org.yamcs.protobuf.Pvalue.ParameterValue>poll(long timeout) Returns the next delivery.
-
Method Details
-
poll
Returns the next delivery. Or null, if nothing was received yet. -
poll
public List<org.yamcs.protobuf.Pvalue.ParameterValue> poll(long timeout) throws InterruptedException Returns the next delivery. Or null, if nothing was received yet.- Throws:
InterruptedException
-
expectTimely
public List<org.yamcs.protobuf.Pvalue.ParameterValue> expectTimely() throws InterruptedException, TimeoutExceptionReturns the next delivery. If there is nothing available yet, this will block for the specified time awaiting delivery.- Throws:
InterruptedExceptionTimeoutException
-
assertSilence
- Throws:
InterruptedException
-
clear
public void clear() -
isEmpty
public boolean isEmpty()Returns true if there are not currently any unprocessed deliveries. -
getPendingCount
public int getPendingCount()Returns the number of unprocessed value deliveries. -
expectTimelyInvalidIdentifier
public org.yamcs.protobuf.Yamcs.NamedObjectId expectTimelyInvalidIdentifier() throws InterruptedException, TimeoutException- Throws:
InterruptedExceptionTimeoutException
-
of
-