Esempio n. 1
0
  /**
   * Create a Pastry node and add it to pastryNodes. Also create a client application for this node.
   */
  public void makePastryNode(int num) {
    PastryNode pn = factory.newNode(getBootstrap());
    pastryNodes.addElement(pn);

    HelloWorldApp app = new HelloWorldApp(pn);
    helloClients.addElement(app);

    synchronized (pn) {
      while (!pn.isReady()) {
        try {
          pn.wait(300);
        } catch (InterruptedException ie) {
        }
      }
    }

    System.out.println("created " + num + " " + pn);
  }