@Override public void reqService(Service service) throws TransportException { serviceAccept.lock(); try { serviceAccept.clear(); sendServiceRequest(service.getName()); serviceAccept.await(timeoutMs, TimeUnit.MILLISECONDS); setService(service); } finally { serviceAccept.unlock(); } }
@Override public void join(int timeout, TimeUnit unit) throws TransportException { close.await(timeout, unit); }
@Override public void join() throws TransportException { close.await(); }