Package net.kuujo.vertigo.io

Examples of net.kuujo.vertigo.io.OutputContext


  public void update(OutputContext context) {
    log.debug(String.format("%s - Output context changed, updating ports", this));

    // Copy the context in order to ensure that future changes via the
    // observer will not effect this update.
    final OutputContext update = context.copy();

    // All updates are run sequentially to prevent race conditions
    // during configuration changes. Without essentially locking the
    // object, it could be possible that connections are simultaneously
    // added and removed or opened and closed on the object.
    tasks.runTask(new Handler<Task>() {
      @Override
      public void handle(final Task task) {
        final List<OutputPort> newPorts = new ArrayList<>();
        for (OutputPortContext output : update.ports()) {
          if (!ports.containsKey(output.name())) {
            OutputPortContext port = DefaultOutputCollector.this.context.port(output.name());
            if (port != null) {
              log.debug(String.format("%s - Adding out port: %s", DefaultOutputCollector.this, output));
              newPorts.add(new DefaultOutputPort(vertx, port));
View Full Code Here


                }
                return (T) inPort;
              }
              return (T) input;
            case ContextUri.ENDPOINT_OUT:
              OutputContext output = instance.output();
              if (curi.hasPort()) {
                OutputPortContext outPort = output.port(curi.getPort());
                if (outPort == null) {
                  throw new IllegalArgumentException("The URI port " + curi.getPort() + " does not exist in the given output configuration");
                }
                return (T) outPort;
              }
View Full Code Here

TOP

Related Classes of net.kuujo.vertigo.io.OutputContext

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.