Package fr.imag.adele.apam

Examples of fr.imag.adele.apam.Composite


      }
      return;
  }

  String appName = args[0];
  Composite app = apam.getComposite(appName);
  if (app == null) {
      out.println("No such root composite : " + appName);
      return;
  }
  out.println("Application " + app);
  for (Composite compo : app.getSons()) {
      out.println("Son Composites : " + compo.getName());
  }
  for (Composite compo : app.getDepend()) {
      out.println("Depends on composites : " + compo.getName());
  }
    }
View Full Code Here


  if (compositeTarget == null) {// if the composite target is null, use
      // the root composite
      compositeTarget = "root";
  }

  Composite target = apam.getComposite(compositeTarget);
  if (target == null) {
      out.println("Invalid composite target name : " + compositeTarget);
      return null;
  }
  return target;
View Full Code Here

      }
      return;
  }

  String compoName = args[0];
  Composite compo = compoName.equals("root") ? CompositeImpl
    .getRootAllComposites() : apam.getComposite(compoName);
  if (compo == null) {
      out.println("No such composite : " + compoName);
      return;
  }
View Full Code Here

     */
    public void load(PrintWriter out, String... args) {

  String componentName = null;
  String compositeName = null;
  Composite composite = null;

  if (args.length == 0) {
      argumentMessageError(out, "charge <component-name> [composite]\n");
      return;
  }
View Full Code Here

     * @see fr.imag.adele.apam.jmx.ApamJMX#launch(java.lang.String, java.lang.String)
     */
    @Override
    public String launch(String componentName, String compositeTarget) {
        String text="";
        Composite target = null;
        CompositeType targetType = null;

        if ("root".equals(compositeTarget)) {
            text+=("\nResolving " + componentName + " on the root composite");
        } else {
            target = apam.getComposite(compositeTarget);
            if (target == null) {
                text+=("\nInvalid composite instance " + compositeTarget);
                return text;
            }
            targetType = target.getCompType();
        }

        fr.imag.adele.apam.Component compo = CST.apamResolver.findComponentByName(targetType, componentName);
        if (compo instanceof Implementation)
            ((Implementation) compo).createInstance(target, null);
View Full Code Here

     * @see fr.imag.adele.apam.jmx.ApamJMX#appli(java.lang.String)
     */
    @Override
    public String appli(String appliName) {
        String text="";
        Composite appli = apam.getComposite(appliName);
        if (appli == null) {
            text+=("\nNo such root composite : " + appliName);
            return text;
        }
        text+=("\nApplication " + appli);
        for (Composite compo : appli.getSons()) {
            text+=("\nSon Composites : " + compo.getName());
        }
        for (Composite compo : appli.getDepend()) {
            text+=("\nDepends on composites : " + compo.getName());
        }
       return text;
    }
View Full Code Here

     * @see fr.imag.adele.apam.jmx.ApamJMX#compo(java.lang.String)
     */
    @Override
    public String compo(String compoName) {
        String text="";
        Composite compo = apam.getComposite(compoName);
        if (compo == null) {
            text+=("\nNo such composite : " + compoName);
            return text;
        }
        return "\n"+printComposite(compo, "");
View Full Code Here

    /*
     * Create a content manager associated to newly created composites
     */
    if (component instanceof Composite) {

      Composite composite = (Composite) component;

      if (getManager(composite) != null) {
        logger.error("Composite already added in APAM "+ composite.getName());
        return;
      }

      try {

View Full Code Here

     */
    try {

      contentManagers = new HashMap<Composite, ContentManager>();

      Composite root = CompositeImpl.getRootAllComposites();
      rootManager = new ContentManager(this, root);

      contentManagers.put(root, rootManager);
      rootManager.start();

View Full Code Here

    Implementation impl_jackhammer = waitForImplByName(null,
        "JackHammer_singleton");
    Implementation impl_worker = waitForImplByName(null, "Worker_waiting");
    Implementation impl_toolmanager = waitForImplByName(null, "ToolManager");

    Composite yard = (Composite) ct.createInstance(null, null);
    impl_jackhammer.createInstance(null, null);

    Worker worker1 = (Worker) impl_worker.createInstance(yard, null)
        .getServiceObject();

    apam.waitForIt(Constants.CONST_WAIT_TIME);

    Instance dayinst = null;
    Instance managerinst = null;
    for (Instance inst : yard.getContainInsts()) {
      if (inst.getImpl().equals(impl_daystate)) {
        dayinst = inst;
      } else if (inst.getImpl().equals(impl_toolmanager)) {
        managerinst = inst;
      }
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.Composite

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.