Package net.kuujo.vertigo.io.port

Examples of net.kuujo.vertigo.io.port.InputPort


  @Override
  public InputPort port(String name) {
    // Attempt to search for the port in the existing context. If the
    // port isn't an explicitly configured port then lazily create
    // and open the port. The lazy port will be empty.
    InputPort port = ports.get(name);
    if (port == null) {
      log.debug(String.format("%s - Lazily creating in port: %s", this, name));

      // Attempt to search for the port in the existing context. If the
      // port isn't an explicitly configured port then lazily create
      // and open the port. The lazy port will be empty.
      InputPortContext portContext = context.port(name);
      if (portContext == null) {
        portContext = DefaultInputPortContext.Builder.newBuilder()
            .setAddress(UUID.randomUUID().toString())
            .setName(name)
            .build();
        DefaultInputContext.Builder.newBuilder((DefaultInputContext) context).addPort(portContext);
      }
      port = new DefaultInputPort(vertx, context.port(name));
      if (started) {
        port.open();
      }
      ports.put(name, port);
    }
    return port;
  }
View Full Code Here

TOP

Related Classes of net.kuujo.vertigo.io.port.InputPort

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.