Package fr.imag.adele.apam

Examples of fr.imag.adele.apam.Link


          + " to " + to
          + " could not be created in the real instance.");
      return false;
    }

    Link link = new LinkImpl(this, to, dep, hasConstraints, promotion);
    links.add(link);
    ((ComponentImpl) to).invlinks.add(link);
    getApformComponent().setLink(to, depName);

    // Notify Dynamic managers that a new link has been created
View Full Code Here


  /**
   * resolve
   */
  @Override
  public Component getLinkDest(String depName) {
    Link link = getLink(depName);
    return (link == null) ? null : link.getDestination();
  }
View Full Code Here

    nbInst++ ;

    Instance test = null ;

    String s ;
    Link l ;
    for (int k = 0; k < 10; k++) {
      System.out.println("creating 1000 instances");
      for (int i = 0; i < 100; i++) {
        test = implS1.createInstance(null, null);
        nbInst++ ;
View Full Code Here

  theoricLinks.add("lightKitchen");

  Set<Link> listRelations = lightApplication.getRawLinks();
  Iterator<Link> it = listRelations.iterator();
  while (it.hasNext()) {
      Link rel = it.next();
      logger.debug("testMyKitchenBinding(), link to "
        + rel.getDestination().getName());
      // Should find one binding with buttonKitchen and one binding with a
      // lightKitchen
      if (theoricLinks.contains(rel.getDestination().getName())) {
    theoricLinks.remove(rel.getDestination().getName());
      } else {
    logger.error("testMyKitchenBinding() -> this link should not exists");
      }
  }
  if (theoricLinks.size() > 0) {
View Full Code Here

    auxListInstances();

    Set<Link> listRelations = myKitchen.getRawLinks();
    Iterator<Link> it = listRelations.iterator();
    while (it.hasNext()) {
      Link rel = it.next();
      // Should find one binding with buttonKitchen and one binding with a
      // lightKitchen
      System.out.println("Link : " + rel);
      System.err.println("-> " + rel.getDestination().getName());
      if (linksKitchen.contains(rel.getDestination().getName())) {
        linksKitchen.remove(rel.getDestination().getName());
      } else {
        Assert.fail("testMyKitchenBinding() -> this link should not exists : "
            + rel.getDestination().getName());
      }
    }
    if (linksKitchen.size() > 0) {
      Assert.fail("testMyKitchenBinding() -> not all links completed, "
          + linksKitchen.size() + " links remaining");
View Full Code Here

 
 

  public void p4(){
    System.out.println("Checking Dynamic Wire deletion to multiple dependency" ) ;
    Link w = (Link)myInst.getRawLinks().toArray()[0] ;
    rmInst = w.getDestination() ;
//    myInst.removeLink(w) ;
  }
View Full Code Here

    }
    else for (Instance s3 : s3Insts) {
      System.out.println("     =======" + s3);
    }
   
    Link lk = thisInst.getLink("linkS2") ;
    System.out.println("linkS2 : "  + lk);
   
    lk = thisInst.getLink("testID") ;
    System.out.println("testId : "  + lk);
View Full Code Here

TOP

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

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.