Package fr.dyade.aaa.agent.conf

Examples of fr.dyade.aaa.agent.conf.A3CMLDomain


   
    if (a3cmlConfig.servers.get(new Short((short)routerId)) == null)
      throw new Exception("Server not found: " + routerId);
   
    // Update the configuration (can't fail)
    A3CMLDomain domain = new A3CMLDomain(domainName, network);
    a3cmlConfig.addDomain(domain);
    A3CMLServer a3cmlServer = a3cmlConfig.getServer((short) routerId);
    domain.addServer(a3cmlServer);
    A3CMLNetwork a3cmlNetwork = new A3CMLNetwork(domainName, port);
    a3cmlServer.addNetwork(a3cmlNetwork);

    A3CMLServer root = a3cmlConfig.getServer(AgentServer.getServerId());
    a3cmlConfig.configure(root);
View Full Code Here


      logger.log(BasicLevel.DEBUG,
                 "ServerConfigHelper.removeDomain(" +
                 domainName + ')');

    A3CMLConfig a3cmlConfig = AgentServer.getConfig();
    A3CMLDomain domain = a3cmlConfig.getDomain(domainName);

    if (logger.isLoggable(BasicLevel.DEBUG))
      logger.log(BasicLevel.DEBUG,
                 " -> domain.servers = " + domain.servers);
View Full Code Here

   
    A3CMLConfig a3cmlConfig = AgentServer.getConfig();
    if (a3cmlConfig.servers.get(new Integer(sid)) != null)
      throw new ServerIdAlreadyUsedException("Server id already used: " + sid);
   
    A3CMLDomain domain = a3cmlConfig.getDomain(domainName);
   
    A3CMLServer server = new A3CMLServer((short)sid, name, hostName);
    a3cmlConfig.addServer(server);

    A3CMLNetwork network = new A3CMLNetwork(domainName, port);
    server.addNetwork(network);
    domain.addServer(server);
    server.domain = domainName;

    A3CMLServer root = a3cmlConfig.getServer(AgentServer.getServerId());
    a3cmlConfig.configure(root);
   
View Full Code Here

    // Search all directly accessible domains.
    for (Enumeration n = root.networks.elements(); n.hasMoreElements();) {
      A3CMLNetwork network = (A3CMLNetwork) n.nextElement();

      A3CMLDomain domain = getConfig().getDomain(network.domain);
      // Creates the corresponding MessageConsumer.
      try {
        Network consumer = (Network) Class.forName(domain.network).newInstance();
        // Initializes it with domain description. Be careful, this array
        // is kept in consumer, don't reuse it!!
        consumer.init(domain.name, network.port, domain.getServersId());
        if (consumer instanceof SimpleNetwork && jgroups != null) {
          //NTA modify to SimpleHANetwork
          ((SimpleNetwork) consumer).setJGroups(jgroups);
          jgroups.setNetWork((SimpleNetwork) consumer);
        }
View Full Code Here

        }

        if (a3config == null) {
          // 3rd, Generate A3CMLConfig base.
          logmon.log(BasicLevel.WARN, "Generate default configuration");
          A3CMLDomain d = new A3CMLDomain(ADMIN_DOMAIN, SimpleNetwork.class.getName());
          A3CMLServer s = new A3CMLServer((short) 0, ADMIN_SERVER, "localhost");
          s.networks.addElement(new A3CMLNetwork(ADMIN_DOMAIN, 27300));
          d.addServer(s);
          a3config = new A3CMLConfig();
          a3config.addDomain(d);
          a3config.addServer(s);
        }
      }
View Full Code Here

        String domainName = request.getDomainName();
        Iterator servers;
        A3CMLConfig config = AgentServer.getConfig();
        int serversCount;
        if (domainName != null) {
          A3CMLDomain domain = config.getDomain(domainName);
          servers = domain.servers.iterator();
          serversCount = domain.servers.size();
        } else {
          servers = config.servers.values().iterator();
          serversCount = config.servers.size();
View Full Code Here

TOP

Related Classes of fr.dyade.aaa.agent.conf.A3CMLDomain

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.