Examples of await()


Examples of org.apache.sshd.common.io.IoWriteFuture.await()

            Buffer buffer = cs.createBuffer(SshConstants.SSH_MSG_DISCONNECT);
            buffer.putInt(SshConstants.SSH2_DISCONNECT_BY_APPLICATION);
            buffer.putString("Cancel");
            buffer.putString("");
            IoWriteFuture f = cs.writePacket(buffer);
            f.await();
            suspend(cs.getIoSession());

            TestEchoShellFactory.TestEchoShell.latch.await();
        } finally {
            TestEchoShellFactory.TestEchoShell.latch = null;
View Full Code Here

Examples of org.apache.tomcat.util.threads.CounterLatch.await()

        connectionCounterLatch = null;
    }
   
    protected void awaitConnection() throws InterruptedException {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) latch.await();
    }
   
    protected long countUpConnection() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) return latch.countUp();
View Full Code Here

Examples of org.ardverk.dht.utils.Idle.await()

          boolean hasContent = handleContent(response);
         
          boolean success = handleResponse(response);
         
          if (success && hasContent) {
            idle.await(10L, TimeUnit.SECONDS);
          }
         
        } catch (Exception err) {
          uncaughtException(client, err);
          handleException(request, err);
View Full Code Here

Examples of org.cometd.javascript.Latch.await()

                "};" +
                "" +
                "cometd.handshake();");
        Assert.assertTrue(latch.await(5000));

        Assert.assertTrue(connectLatch.await(5000));

        evaluateScript("cometd.disconnect(true);");
    }

    @Test
View Full Code Here

Examples of org.eclipse.jetty.client.util.InputStreamResponseListener.await()

        Assert.assertEquals(-1, input.read());

        chunk1Latch.countDown();

        // Result succeeds because a 504 is a valid HTTP response.
        Result result = listener.await(5, TimeUnit.SECONDS);
        Assert.assertTrue(result.isSucceeded());

        // Make sure the proxy does not receive chunk2.
        Assert.assertEquals(-1, input.read());
View Full Code Here

Examples of org.fusesource.hawtdispatch.internal.util.RunnableCountDownLatch.await()

  public void autoCreateBroker() throws Exception {
    Transport connect = TransportFactory.connect("vm://test1");
        connect.setDispatchQueue(Dispatch.createQueue());
        RunnableCountDownLatch cd = new RunnableCountDownLatch(1);
        connect.start(cd);
        cd.await();
    assertNotNull(connect);
        cd = new RunnableCountDownLatch(1);
    connect.stop(cd);
        cd.await();
  }
View Full Code Here

Examples of org.fusesource.mqtt.client.Promise.await()

            public void onFailure(Throwable value) {
                promise.onFailure(value);
                connection.disconnect(null);
            }
        });
        promise.await(configuration.getConnectWaitInSeconds(), TimeUnit.SECONDS);
    }

    protected void doStop() throws Exception {
        if (connection != null) {
            final Promise promise = new Promise();
View Full Code Here

Examples of org.glassfish.admin.mbeanserver.PendingConfigBeanJob.await()

            if (job == null) {
                mLogger.log(Level.INFO, AMXLoggerInfo.configBeanNotProcessed, cb.getProxyType().getName());
                processed = false;
            } else if (waitDone) {
                try {
                    job.await();
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        } else {
View Full Code Here

Examples of org.hive2hive.core.network.data.futures.FutureChangeProtectionListener.await()

      return false;
    }

    FutureChangeProtectionListener listener = new FutureChangeProtectionListener(parameters);
    putFuture.addListener(listener);
    return listener.await();
  }

  @Override
  public boolean putUserProfileTask(String userId, Number160 contentKey, NetworkContent content,
      KeyPair protectionKey) {
View Full Code Here

Examples of org.hive2hive.core.network.data.futures.FuturePutListener.await()

      return false;
    }

    FuturePutListener listener = new FuturePutListener(parameters, this);
    putFuture.addListener(listener);
    return listener.await();
  }

  @Override
  public boolean changeProtectionKey(IParameters parameters) {
    FuturePut putFuture = changeProtectionKeyUnblocked(parameters);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.