@Override public synchronized void setService(Service service) { if (service == null) service = nullService; log.debug("Setting active service to {}", service.getName()); this.service = service; }
@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 String getNextServiceName() { return nextService.getName(); }