コード例 #1
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("--------------------------------------");
  }
コード例 #2
0
  public synchronized void solicitaRegistroDeParteDeDominio() {
    try {
      String content =
          this.address
              + " "
              + this.port
              + " "
              + environment.getDomainPartName()
              + " "
              + environment.getDomainName();

      ControlMessage m =
          new ControlMessage(
              ControlMessage.REGISTER_DOMAIN_PART, this.address, this.mainPlatformAddress, content);

      sendMessageToMainDomain(m);

      m = null;

      SemantiCore.notification.print("[ I ] ControlBridge > Mensagem de registro enviada");
    } catch (Exception e) {
      System.err.println("[ E ] ControlBridge > Erro ao enviar mensagem de registro");
      e.printStackTrace();
    }
  }