Exemplo n.º 1
0
 private boolean tryWith(AuthMethod meth) throws UserAuthException, TransportException {
   currentMethod = meth;
   result.clear();
   meth.init(this);
   meth.request();
   return result.get(timeout, TimeUnit.SECONDS);
 }
Exemplo n.º 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();
   }
 }