Package tigase.disco

Examples of tigase.disco.ServiceEntity


    super.setProperties(props);
    //service_disco = (Boolean)props.get(RETURN_SERVICE_DISCO_KEY);
    identity_type = (String)props.get(IDENTITY_TYPE_KEY);

    //serviceEntity = new ServiceEntity(getName(), "external", "XEP-0114");
    serviceEntity = new ServiceEntity(XMLNS + " " + getName(), null, XMLNS);
    serviceEntity.addIdentities(
      new ServiceIdentity("component", identity_type, XMLNS + " " + getName()));
    connect_all = (Boolean)props.get(CONNECT_ALL_PROP_KEY);
    cluster_controller_id = (String)props.get(CLUSTER_CONTR_ID_PROP_KEY);
//     notify_admins = (Boolean)props.get(NOTIFY_ADMINS_PROP_KEY);
View Full Code Here


      }
    }
  }

  private void updateServiceDiscovery(String jid, String name) {
    ServiceEntity item = new ServiceEntity(jid, null, name);
    //item.addIdentities(new ServiceIdentity("component", identity_type, name));
    log.info("Modifing service-discovery info: " + item.toString());
    serviceEntity.addItems(item);
  }
View Full Code Here

   */
  private String routerCompName = null;

  public void setName(String name) {
    super.setName(name);
    serviceEntity = new ServiceEntity(name, "config", "Server configuration");
    serviceEntity.addIdentities(new ServiceIdentity[] {
        new ServiceIdentity("automation", "command-list",
          "Configuration commands")});
    serviceEntity.addFeatures(DEF_FEATURES);
    config_list = new ServiceEntity(name, "list", "List");
    config_list.addIdentities(new ServiceIdentity[] {
        new ServiceIdentity("automation", "command-list",
          "Config listings")});
    config_list.addFeatures(DEF_FEATURES);
    config_set = new ServiceEntity(name, "set", "Set");
    config_set.addIdentities(new ServiceIdentity[] {
        new ServiceIdentity("automation", "command-list",
          "Config settings")});
    config_set.addFeatures(DEF_FEATURES);
    ServiceEntity item = new ServiceEntity(getName(), "--none--",
      "Add new component...");
    item.addFeatures(CMD_FEATURES);
    item.addIdentities(new ServiceIdentity("automation", "command-node",
          "Add new component..."));
    config_set.addItems(item);
    serviceEntity.addItems(config_list, config_set);
  }
View Full Code Here

    return component instanceof Configurable;
  }

  public void componentAdded(Configurable component) {
    log.finer(" component: " + component.getName());
    ServiceEntity item = config_list.findNode(component.getName());
    if (item == null) {
      item = new ServiceEntity(getName(), component.getName(),
        "Component: " + component.getName());
      item.addFeatures(CMD_FEATURES);
      item.addIdentities(new ServiceIdentity[] {
          new ServiceIdentity("automation", "command-node",
            "Component: " + component.getName())});
      config_list.addItems(new ServiceEntity[] {item});
    }
    if (config_set.findNode(component.getName()) == null) {
View Full Code Here

  private Level statsLevel = Level.INFO;

  @Override
  public void setName(String name) {
    super.setName(name);
    serviceEntity = new ServiceEntity(name, "load", "Server clustering");
    serviceEntity.addIdentities(
      new ServiceIdentity("component", "load", "Server clustering"));
    serviceEntity.addFeatures(DEF_FEATURES);
    serviceEntity.addFeatures(CMD_FEATURES);
  }
View Full Code Here

    serviceEntity.addFeatures(DEF_FEATURES);
    serviceEntity.addFeatures(CMD_FEATURES);
  }

  public void componentAdded(ClusteredComponent component) {
    ServiceEntity item = serviceEntity.findNode(component.getName());
    if (item == null) {
      item = new ServiceEntity(getName(), component.getName(),
        "Component: " + component.getName());
      item.addFeatures(CMD_FEATURES);
      item.addIdentities(new ServiceIdentity("automation", "command-node",
            "Component: " + component.getName()));
      serviceEntity.addItems(item);
    }
  }
View Full Code Here

  }

  @Override
  public void setName(String name) {
    super.setName(name);
    serviceEntity = new ServiceEntity(name, null, "VHosts Manager");
    serviceEntity.addIdentities(
      new ServiceIdentity("component", "generic""VHost Manager"),
//      new ServiceIdentity("automation", "command-node",  "All VHosts"),
      new ServiceIdentity("automation", "command-list",
        "VHosts management commands"));
    serviceEntity.addFeatures(DEF_FEATURES);
    serviceEntity.addFeatures(CMD_FEATURES);

    ServiceEntity item = new ServiceEntity(getName(),
            Command.VHOSTS_RELOAD.toString(),
            "Reload VHosts from repository");
    item.addFeatures(CMD_FEATURES);
    item.addIdentities(new ServiceIdentity("automation", "command-node",
            "Reload VHosts from repository"));
    serviceEntity.addItems(item);

    item = new ServiceEntity(getName(),
            Command.VHOSTS_UPDATE.toString(),
            "Add/Update selected VHost information");
    item.addFeatures(CMD_FEATURES);
    item.addIdentities(new ServiceIdentity("automation", "command-node",
            "Add/Update selected VHost information"));
    serviceEntity.addItems(item);

    item = new ServiceEntity(getName(),
            Command.VHOSTS_REMOVE.toString(),
            "Remove selected VHost");
    item.addFeatures(CMD_FEATURES);
    item.addIdentities(new ServiceIdentity("automation", "command-node",
            "Remove selected VHost"));
    serviceEntity.addItems(item);

  }
View Full Code Here

    }
    discoCategory = (String) properties.get(DISCO_CATEGORY_PROP_KEY);
    discoType = (String) properties.get(DISCO_TYPE_PROP_KEY);
    discoFeatures = ((String) properties.get(DISCO_TYPE_PROP_KEY)).split(",");

    serviceEntity = new ServiceEntity(getName(), null, discoName);
    serviceEntity.addIdentities(new ServiceIdentity(discoCategory, discoType,
            discoName));
    for (String feature : discoFeatures) {
      serviceEntity.addFeatures(feature);
    }
View Full Code Here

  private Level statsLevel = Level.INFO;

  @Override
  public void setName(String name) {
    super.setName(name);
    serviceEntity = new ServiceEntity(name, "stats", "Server statistics");
    serviceEntity.addIdentities(
      new ServiceIdentity("component", "stats""Server statistics"),
      new ServiceIdentity("automation", "command-node""All statistics"),
      new ServiceIdentity("automation", "command-list",
        "Statistics retrieving commands"));
View Full Code Here

    serviceEntity.addFeatures(DEF_FEATURES);
    serviceEntity.addFeatures(CMD_FEATURES);
  }

  public void componentAdded(StatisticsContainer component) {
    ServiceEntity item = serviceEntity.findNode(component.getName());
    if (item == null) {
      item = new ServiceEntity(getName(), component.getName(),
        "Component: " + component.getName());
      item.addFeatures(CMD_FEATURES);
      item.addIdentities(new ServiceIdentity("automation", "command-node",
            "Component: " + component.getName()));
      serviceEntity.addItems(item);
    }
  }
View Full Code Here

TOP

Related Classes of tigase.disco.ServiceEntity

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.