Example #1
0
  private void autobahn() throws ResourceException, ProtocolException {
    LOGGER.info("autobahn ...");
    l2BoDCapabilityService = OpennaasClient.getL2BoDCapabilityService();
    queueManager = OpennaasClient.getQueueManagerCapabilityService();
    resourceManagerService = OpennaasClient.getResourceManagerService();
    protocolSessionManagerService = OpennaasClient.getProtocolSessionManagerService();

    // BoD
    ResourceIdentifier identifier5 = null;

    identifier5 =
        resourceManagerService.createResource(
            getBoDResourceDescriptor("", getText("autobahn.bod.name"), "bod", ""));
    protocolSessionManagerService.registerContext(
        identifier5.getId(),
        getProtocolSessionContext(getText("protocol.bod.name"), getText("protocol.uri.autobahn")));
    resourceManagerService.startResource(identifier5);

    session.put(getText("autobahn.bod.name"), identifier5);

    // Connection 1
    String interfaceName1 = getText("autobahn.connection1.interface1");
    String interfaceName2 = getText("autobahn.connection1.interface2");
    String vlanid = getText("autobahn.connection1.vlanid");
    String endtime = getText("autobahn.connection1.endtime");
    String capacity = getText("autobahn.connection1.capacity");
    l2BoDCapabilityService.requestConnection(
        identifier5.getId(), interfaceName1, interfaceName2, vlanid, capacity, endtime);

    queueManager.execute(identifier5.getId());
    LOGGER.info("  connection 1 done.");

    // Connection 2
    interfaceName1 = getText("autobahn.connection2.interface1");
    interfaceName2 = getText("autobahn.connection2.interface2");
    vlanid = getText("autobahn.connection2.vlanid");
    endtime = getText("autobahn.connection2.endtime");
    capacity = getText("autobahn.connection2.capacity");

    l2BoDCapabilityService.requestConnection(
        identifier5.getId(), interfaceName1, interfaceName2, vlanid, capacity, endtime);

    queueManager.execute(identifier5.getId());
    LOGGER.info("  connection 2 done.");
  }