Package org.yamcs.tests
Class ParameterCaptor
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 TypeMethodDescriptionvoid
void
clear()
Returns the next delivery.int
Returns the number of unprocessed value deliveries.boolean
isEmpty()
Returns true if there are not currently any unprocessed deliveries.static ParameterCaptor
of
(ParameterSubscription subscription) poll()
Returns the next delivery.poll
(long timeout) Returns the next delivery.
-
Method Details
-
poll
Returns the next delivery. Or null, if nothing was received yet. -
poll
Returns the next delivery. Or null, if nothing was received yet.- Throws:
InterruptedException
-
expectTimely
Returns the next delivery. If there is nothing available yet, this will block for the specified time awaiting delivery.- Throws:
InterruptedException
TimeoutException
-
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 Yamcs.NamedObjectId expectTimelyInvalidIdentifier() throws InterruptedException, TimeoutException- Throws:
InterruptedException
TimeoutException
-
of
-