Ejemplo n.º 1
0
  /** Debug function: prints info about a given dataflow port. */
  public static void inspectDataFlowPort(Port port) {
    //
    Stereotype pst = port.getAppliedStereotypes().get(0);

    // Type du port
    if (port.getType() != null) {
      java.lang.System.out.println("\t\t* type: " + port.getType().getName());
    } else {
      java.lang.System.err.println("\t\t\t* port " + port.getName() + " has no type ! ");
    }
    //
    //
    // A partir des attributs ci-dessous, on peut récupérer:
    // - la taille du buffer
    // - la direction (énuméré IN ou OUT)
    // - le protocole de synchronization (énuméré SYNCH ou ASYNCH ou UNDEFINED)
    //
    for (Property propSt : pst.getAllAttributes()) {
      java.lang.System.out.println(
          "\t\t* port stereotype has attribute: "
              + propSt.getName()
              + " - "
              + port.getValue(pst, propSt.getName()));
    }
  }
Ejemplo n.º 2
0
  /** Debug function. Prints info about a given service port. */
  public static void inspectServicePort(Port port) {
    //
    Stereotype pst = port.getAppliedStereotypes().get(0);

    //
    if (port.getType() != null) {
      java.lang.System.out.println("\t\t* type: " + port.getType().getName());
    } else {
      java.lang.System.err.println("\t\t\t* port " + port.getName() + " has no type ! ");
    }
    // A partir des attributs ci-dessous, on peut récupérer:
    // - le type d'interface(énuméré Provided ou Required)
    // - le protocole de synchronization (énuméré SYNCH ou ASYNCH ou UNDEFINED)
    //

    for (Property propSt : pst.getAllAttributes()) {
      java.lang.System.out.println(
          "\t\t* port stereotype has attribute: "
              + propSt.getName()
              + " - "
              + port.getValue(pst, propSt.getName()));
    }
  }