示例#1
0
  @Override
  public synchronized void setService(Service service) {
    if (service == null) service = nullService;

    log.debug("Setting active service to {}", service.getName());
    this.service = service;
  }
示例#2
0
 @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();
   }
 }
示例#3
0
 @Override
 public String getNextServiceName() {
   return nextService.getName();
 }