Package fr.imag.adele.apam

Examples of fr.imag.adele.apam.Composite


  Implementation subjectBimpl = waitForImplByName(null, "subject-b");

  CompositeType subjectBCompositeType = (CompositeType) waitForImplByName(
    null, "subject-b-composite");
  Composite subjectBComposite = (Composite) subjectBCompositeType
    .createInstance(null, Collections.<String, String> emptyMap());

  // Instance of the subject-a (parent)
  Instance subjectB = subjectBimpl
    .createInstance(subjectBComposite, null);
View Full Code Here


  Implementation subjectDimpl = waitForImplByName(null, "subject-d");

  CompositeType subjectCCompositeType = (CompositeType) waitForImplByName(
    null, "subject-d-composite");
  Composite subjectDComposite = (Composite) subjectCCompositeType
    .createInstance(null, Collections.<String, String> emptyMap());

  // Instance of the subject-a (parent)
  Instance subjectD = subjectDimpl
    .createInstance(subjectDComposite, null);
View Full Code Here

    return app;
  }

  public <T> T createInstance(CompositeType CompoType, Class<T> class1) {

    Composite instanceApp = (Composite) CompoType
        .createInstance(null, null);

    assertNotNull(instanceApp);

    T appSpec = class1.cast(instanceApp.getServiceObject());

    return appSpec;

  }
View Full Code Here

      }
    } else if (this instanceof Instance) {
      put(CST.INSTNAME, apform.getDeclaration().getName());
      if (this instanceof Composite) {

        Composite composite = (Composite) this;
        put(CST.APAM_COMPOSITE, CST.V_TRUE);
        if (composite.getMainInst() != null) {
          put(CST.APAM_MAIN_INSTANCE, composite.getMainInst()
              .getName());
        }
      }
    }
View Full Code Here

    "HouseMeterNotSingletonShared");

  CompositeType root = (CompositeType) impl.getInCompositeType()
    .toArray()[0];

  Composite rootComposite = null;

  if (root.getInst() instanceof Composite) {
      rootComposite = (Composite) root.getInst();
  }
View Full Code Here

  CompositeType root = (CompositeType) impl.getInCompositeType()
    .toArray()[0];

  System.out.println("IMPL:" + impl);

  Composite rootComposite = null;

  if (root.getInst() instanceof Composite) {
      rootComposite = (Composite) root.getInst();
  }
View Full Code Here

      }
      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

    @Descriptor("creates and start a new instance of the target implementation")
    public void load(@Descriptor("target component") 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

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.