Package net.kuujo.vertigo.io.connection

Examples of net.kuujo.vertigo.io.connection.ConnectionConfig$Source


    container.setLayoutData(new GridData(GridData.FILL_BOTH));
    Button btnCreateSource = new Button(container, SWT.NONE);
    btnCreateSource.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        Source newSource = new Source();
        newSource.setId("Source_" + (table.getItemCount() + 1)); //$NON-NLS-1$
        SourceBindingWrapper sourceBindingWrapper = new SourceBindingWrapper(newSource);
        writableList.add(sourceBindingWrapper);
        tableViewer.setSelection(new StructuredSelection(sourceBindingWrapper));
      }
    });
View Full Code Here


    titleStmt.getTitles().add(title);
    fileDesc.setTitleStmt(titleStmt);
    PubStmt pubStmt = new PubStmt();
    fileDesc.setPubStmt(pubStmt);
    SourceDesc sourceDesc = new SourceDesc();
    Source source = new Source();
    sourceDesc.getSources().add(source);
    fileDesc.setSourceDesc(sourceDesc);   
    meiHead.setFileDesc(fileDesc)
    mei.setMeiHead(meiHead);
    Music music = new Music();
View Full Code Here

    assertEquals(2, module4.getInstances());
  }

  @Test
  public void testConnectionEquals() {
    ConnectionConfig connection1 = new DefaultConnectionConfig("foo:bar", "bar:baz", new DefaultNetworkConfig("test"));
    ConnectionConfig connection2 = new DefaultConnectionConfig("foo:bar", "bar:baz", new DefaultNetworkConfig("test"));
    assertTrue(connection1.equals(connection2));
  }
View Full Code Here

    assertTrue(connection1.equals(connection2));
  }

  @Test
  public void testConnectionDefaultPort() {
    ConnectionConfig connection = new DefaultConnectionConfig("foo", "bar", new DefaultNetworkConfig("test"));
    assertEquals("foo", connection.getSource().getComponent());
    assertEquals("out", connection.getSource().getPort());
    assertEquals("bar", connection.getTarget().getComponent());
    assertEquals("in", connection.getTarget().getPort());
  }
View Full Code Here

  }

  @Test
  public void testCreateConnectionDefaultPort() {
    NetworkConfig network = new DefaultNetworkConfig("test");
    ConnectionConfig connection = network.createConnection("foo", "bar");
    assertEquals("foo", connection.getSource().getComponent());
    assertEquals("out", connection.getSource().getPort());
    assertEquals("bar", connection.getTarget().getComponent());
    assertEquals("in", connection.getTarget().getPort());
  }
View Full Code Here

  }

  @Test
  public void testDestroyConnection() {
    NetworkConfig network = new DefaultNetworkConfig("test");
    ConnectionConfig connection = network.createConnection("foo", "bar");
    network.destroyConnection("foo", "bar");
    boolean exists = false;
    for (ConnectionConfig other : network.getConnections()) {
      if (other.equals(connection)) {
        exists = true;
View Full Code Here

        .putObject("target", new JsonObject().putString("component", "bar").putString("port", "notin"))
        .putObject("grouping", new JsonObject().putString("type", "random"));
    json.putArray("connections", new JsonArray().add(jsonConnection));
    NetworkConfig network = new Vertigo(null, null).createNetwork(json);
    assertEquals("test", network.getName());
    ConnectionConfig connection = network.getConnections().iterator().next();
    assertEquals("foo", connection.getSource().getComponent());
    assertEquals("notout", connection.getSource().getPort());
    assertEquals("bar", connection.getTarget().getComponent());
    assertEquals("notin", connection.getTarget().getPort());
  }
View Full Code Here

  @Override
  public boolean equals(Object other) {
    if (!(other instanceof ConnectionConfig)) {
      return false;
    }
    ConnectionConfig connection = (ConnectionConfig) other;
    return connection.getSource().getComponent().equals(source.getComponent())
        && connection.getSource().getPort().equals(source.getPort())
        && connection.getTarget().getComponent().equals(target.getComponent())
        && connection.getTarget().getPort().equals(target.getPort());
  }
View Full Code Here

    return createConnection(connection, null);
  }

  @Override
  public ConnectionConfig createConnection(String source, String target) {
    ConnectionConfig connection = network.createConnection(source, target);
    cluster.deployNetwork(network);
    return connection;
  }
View Full Code Here

    return createConnection(source, target, doneHandler);
  }

  @Override
  public ConnectionConfig createConnection(String source, String target, Selector selector, Handler<AsyncResult<ActiveNetwork>> doneHandler) {
    ConnectionConfig connection = network.createConnection(source, target, selector);
    cluster.deployNetwork(network, doneHandler);
    return connection;
  }
View Full Code Here

TOP

Related Classes of net.kuujo.vertigo.io.connection.ConnectionConfig$Source

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.