Public Member Functions | |
void | awaitNewSubscriber () throws InterruptedException |
boolean | awaitNewSubscriber (long timeout, TimeUnit unit) throws InterruptedException |
void | awaitShutdown () throws InterruptedException |
boolean | awaitShutdown (long timeout, TimeUnit unit) throws InterruptedException |
void | onNewSubscriber (Publisher< T > publisher, SubscriberIdentifier subscriberIdentifier) |
void | onShutdown (Publisher< T > publisher) |
Static Public Member Functions | |
static< T > CountDownPublisherListener< T > | newDefault () |
static< T > CountDownPublisherListener< T > | newFromCounts (int masterRegistrationSuccessCount, int masterRegistrationFailureCount, int masterUnregistrationSuccessCount, int masterUnregistrationFailureCount, int newSubscriberCount) |
Private Member Functions | |
CountDownPublisherListener (CountDownLatch masterRegistrationSuccessLatch, CountDownLatch masterRegistrationFailureLatch, CountDownLatch masterUnregistrationSuccessLatch, CountDownLatch masterUnregistrationFailureLatch, CountDownLatch newSubscriberLatch) | |
Private Attributes | |
final CountDownLatch | newSubscriberLatch |
final CountDownLatch | shutdownLatch |
A PublisherListener which uses separate CountDownLatch instances for all signals.
Definition at line 32 of file CountDownPublisherListener.java.
org.ros.node.topic.CountDownPublisherListener< T >.CountDownPublisherListener | ( | CountDownLatch | masterRegistrationSuccessLatch, |
CountDownLatch | masterRegistrationFailureLatch, | ||
CountDownLatch | masterUnregistrationSuccessLatch, | ||
CountDownLatch | masterUnregistrationFailureLatch, | ||
CountDownLatch | newSubscriberLatch | ||
) | [inline, private] |
Definition at line 64 of file CountDownPublisherListener.java.
void org.ros.node.topic.CountDownPublisherListener< T >.awaitNewSubscriber | ( | ) | throws InterruptedException [inline] |
Wait for the requested number of shutdowns.
InterruptedException |
Definition at line 89 of file CountDownPublisherListener.java.
boolean org.ros.node.topic.CountDownPublisherListener< T >.awaitNewSubscriber | ( | long | timeout, |
TimeUnit | unit | ||
) | throws InterruptedException [inline] |
Wait for the requested number of new subscribers within the given time period.
timeout | the maximum time to wait |
unit | the TimeUnit of the timeout |
true
false
InterruptedException |
Definition at line 105 of file CountDownPublisherListener.java.
void org.ros.node.topic.CountDownPublisherListener< T >.awaitShutdown | ( | ) | throws InterruptedException [inline] |
Wait for for shutdown.
InterruptedException |
Definition at line 114 of file CountDownPublisherListener.java.
boolean org.ros.node.topic.CountDownPublisherListener< T >.awaitShutdown | ( | long | timeout, |
TimeUnit | unit | ||
) | throws InterruptedException [inline] |
Wait for shutdown within the given time period.
timeout | the maximum time to wait |
unit | the TimeUnit of the timeout |
true
false
InterruptedException |
Definition at line 129 of file CountDownPublisherListener.java.
static <T> CountDownPublisherListener<T> org.ros.node.topic.CountDownPublisherListener< T >.newDefault | ( | ) | [inline, static] |
Definition at line 38 of file CountDownPublisherListener.java.
static <T> CountDownPublisherListener<T> org.ros.node.topic.CountDownPublisherListener< T >.newFromCounts | ( | int | masterRegistrationSuccessCount, |
int | masterRegistrationFailureCount, | ||
int | masterUnregistrationSuccessCount, | ||
int | masterUnregistrationFailureCount, | ||
int | newSubscriberCount | ||
) | [inline, static] |
masterRegistrationSuccessCount | the number of successful master registrations to wait for |
masterRegistrationFailureCount | the number of failing master registrations to wait for |
masterUnregistrationSuccessCount | the number of successful master unregistrations to wait for |
masterUnregistrationFailureCount | the number of failing master unregistrations to wait for |
newSubscriberCount | the number of new subscribers to wait for |
Definition at line 54 of file CountDownPublisherListener.java.
void org.ros.node.topic.CountDownPublisherListener< T >.onNewSubscriber | ( | Publisher< T > | publisher, |
SubscriberIdentifier | subscriberIdentifier | ||
) | [inline] |
A Subscriber has connected to the Publisher.
publisher | the Publisher that the Subscriber connected to |
subscriberIdentifier | the SubscriberIdentifier of the new Subscriber |
Implements org.ros.node.topic.PublisherListener< T >.
Definition at line 75 of file CountDownPublisherListener.java.
void org.ros.node.topic.CountDownPublisherListener< T >.onShutdown | ( | Publisher< T > | publisher | ) | [inline] |
The Publisher has been shut down.
publisher | the Publisher that was shut down |
Implements org.ros.node.topic.PublisherListener< T >.
Definition at line 80 of file CountDownPublisherListener.java.
final CountDownLatch org.ros.node.topic.CountDownPublisherListener< T >.newSubscriberLatch [private] |
Definition at line 36 of file CountDownPublisherListener.java.
final CountDownLatch org.ros.node.topic.CountDownPublisherListener< T >.shutdownLatch [private] |
Definition at line 35 of file CountDownPublisherListener.java.