Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
org.ros.node.topic.CountDownPublisherListener< T > Class Reference
Inheritance diagram for org.ros.node.topic.CountDownPublisherListener< T >:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

A PublisherListener which uses separate CountDownLatch instances for all signals.

Author:
khughes@google.com (Keith M. Hughes)

Definition at line 32 of file CountDownPublisherListener.java.


Constructor & Destructor Documentation

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.


Member Function Documentation

void org.ros.node.topic.CountDownPublisherListener< T >.awaitNewSubscriber ( ) throws InterruptedException [inline]

Wait for the requested number of shutdowns.

Exceptions:
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.

Parameters:
timeoutthe maximum time to wait
unitthe TimeUnit of the
 timeout 
argument
Returns:
 true 
if the requested number of new subscribers connect within the time period
 false 
otherwise.
Exceptions:
InterruptedException

Definition at line 105 of file CountDownPublisherListener.java.

void org.ros.node.topic.CountDownPublisherListener< T >.awaitShutdown ( ) throws InterruptedException [inline]

Wait for for shutdown.

Exceptions:
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.

Parameters:
timeoutthe maximum time to wait
unitthe TimeUnit of the
 timeout 
argument
Returns:
 true 
if shutdown happened within the time period,
 false 
otherwise
Exceptions:
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]
Parameters:
masterRegistrationSuccessCountthe number of successful master registrations to wait for
masterRegistrationFailureCountthe number of failing master registrations to wait for
masterUnregistrationSuccessCountthe number of successful master unregistrations to wait for
masterUnregistrationFailureCountthe number of failing master unregistrations to wait for
newSubscriberCountthe 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.

Parameters:
publisherthe Publisher that the Subscriber connected to
subscriberIdentifierthe 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.

Parameters:
publisherthe Publisher that was shut down

Implements org.ros.node.topic.PublisherListener< T >.

Definition at line 80 of file CountDownPublisherListener.java.


Member Data Documentation

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.


The documentation for this class was generated from the following file:


rosjava_core
Author(s):
autogenerated on Wed Aug 26 2015 16:06:51