Package org.stringtree.waiter

Examples of org.stringtree.waiter.SelfWaiter


    }
   
    public static void ensureStartup(final WebServer server, long timeout) {
      if (null != server) {
         server.start();
         new SelfWaiter() {
          public boolean done() {
            return server.isRunning();
          }
        }.waitOrTimeout(timeout);
      }
View Full Code Here


        try {
        server.join();
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
        if (!new SelfWaiter() {
          public boolean done() {
            return !server.isRunning();
          }
        }.waitOrTimeout(timeout)) {
          server.log("Unable to shutdown server within " + timeout + "ms");
View Full Code Here

    } catch (IOException e) {
      System.out.print("while listening: ");
            e.printStackTrace();
    } finally {
            threads.interrupt();
      new SelfWaiter() {
        public boolean done() {
          return 0 == threads.activeCount();
        }
      }.waitOrTimeout(1000);
            if (listen != null) {
View Full Code Here

TOP

Related Classes of org.stringtree.waiter.SelfWaiter

Copyright © 2018 www.massapicom. 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.