Package net.kuujo.vertigo.io

Examples of net.kuujo.vertigo.io.InputContext


  public void update(InputContext context) {
    log.info(String.format("%s - Input configuration has changed, updating ports", this));

    // Copy the context in order to ensure that future changes via the
    // observer will not effect this update.
    final InputContext 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<InputPort> newPorts = new ArrayList<>();
        for (InputPortContext input : update.ports()) {
          if (!ports.containsKey(input.name())) {
            InputPortContext port = DefaultInputCollector.this.context.port(input.name());
            if (port != null) {
              log.debug(String.format("%s - Adding in port: %s", DefaultInputCollector.this, input));
              newPorts.add(new DefaultInputPort(vertx, port));
View Full Code Here


          throw new IllegalArgumentException("The URI instance " + curi.getInstance() + " does not exist in the given component configuration");
        }
        if (curi.hasEndpoint()) {
          switch (curi.getEndpoint()) {
            case ContextUri.ENDPOINT_IN:
              InputContext input = instance.input();
              if (curi.hasPort()) {
                InputPortContext inPort = input.port(curi.getPort());
                if (inPort == null) {
                  throw new IllegalArgumentException("The URI port " + curi.getPort() + " does not exist in the given input configuration");
                }
                return (T) inPort;
              }
View Full Code Here

TOP

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

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.