public void registerListenersForEngine(Engine engine) throws RemoteException, RemoteException {
   for (Container hostContainer : engine.findChildren()) {
     Host host = (Host) hostContainer;
     host.addContainerListener(this);
     registerListenersForHost(host);
   }
 }
コード例 #2
0
  /**
   * Add a new child Host to our associated Engine.
   *
   * @param host Child host to add
   */
  private void addHost(Host host) {

    if (debug >= 3) engine.log("Adding host '" + host.getName() + "'");

    host.addContainerListener(this);

    // Register the host name
    addAlias(host.getName(), host);

    // Register all associated aliases
    String aliases[] = host.findAliases();
    for (int i = 0; i < aliases.length; i++) addAlias(aliases[i], host);
  }