|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ros.internal.node.CountDownRegistrantListener<ServiceServer<T,S>> org.ros.node.service.CountDownServiceServerListener<T,S>
public class CountDownServiceServerListener<T,S>
A ServiceServerListener
which uses CountDownLatch
to track
message invocations.
Method Summary | ||
---|---|---|
void |
awaitShutdown()
Wait for shutdown. |
|
boolean |
awaitShutdown(long timeout,
java.util.concurrent.TimeUnit unit)
Wait for shutdown within the given time period. |
|
static
|
newDefault()
Construct a CountDownServiceServerListener with all counts set to
1. |
|
static
|
newFromCounts(int masterRegistrationSuccessCount,
int masterRegistrationFailureCount,
int masterUnregistrationSuccessCount,
int masterUnregistrationFailureCount)
|
|
void |
onShutdown(ServiceServer<T,S> server)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.ros.internal.node.RegistrantListener |
---|
onMasterRegistrationFailure, onMasterRegistrationSuccess, onMasterUnregistrationFailure, onMasterUnregistrationSuccess |
Method Detail |
---|
public static <T,S> CountDownServiceServerListener<T,S> newDefault()
CountDownServiceServerListener
with all counts set to
1.
public static <T,S> CountDownServiceServerListener<T,S> newFromCounts(int masterRegistrationSuccessCount, int masterRegistrationFailureCount, int masterUnregistrationSuccessCount, int masterUnregistrationFailureCount)
masterRegistrationSuccessCount
- the number of successful master registrations to wait formasterRegistrationFailureCount
- the number of failing master registrations to wait formasterUnregistrationSuccessCount
- the number of successful master unregistrations to wait formasterUnregistrationFailureCount
- the number of failing master unregistrations to wait forpublic void onShutdown(ServiceServer<T,S> server)
onShutdown
in interface ServiceServerListener<T,S>
server
- the ServiceServer
which has been shut downpublic void awaitShutdown() throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean awaitShutdown(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
timeout
- the maximum time to waitunit
- the time unit of the timeout
argument
true
if shutdown happened within the time period,
false
otherwise
java.lang.InterruptedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |