コード例 #1
0
  public void addDomainRoutingTable(Domain domain) {
    if (this.interDomainRoutingTable.put(domain.getDomainName(), domain) == null) {
      setChanged();
      Object[] o = new Object[] {GUISemantiCore.ADD_DOMAIN, domain};
      notifyObservers(o);

      SemantiCore.notification.print(
          "[ I ] ControlBridge : Domain " + domain.getDomainName() + " added");
    }
  }
コード例 #2
0
  public void printInterDomainRoutingTable() {
    Enumeration<Domain> e = interDomainRoutingTable.elements();

    SemantiCore.notification.print("--------------------------------------");
    while (e.hasMoreElements()) {
      Domain d = e.nextElement();
      if (d.isSubDomain())
        SemantiCore.notification.print(environment.getDomainName() + "." + d.getDomainName());
      else SemantiCore.notification.print(d.getDomainName() + "." + environment.getDomainName());

      SemantiCore.notification.print("		Address : " + d.getAddress());
      SemantiCore.notification.print("		Port 	: " + d.getPort());
    }
    SemantiCore.notification.print("--------------------------------------");
  }