Examples of ConnectionConfig


Examples of hermes.config.ConnectionConfig

            for (Iterator iter = HermesBrowser.getBrowser().getConfig().getFactory().iterator(); iter.hasNext();)
            {
               FactoryConfig fConfig = (FactoryConfig) iter.next();

               ConnectionConfig cConfig = (ConnectionConfig) fConfig.getConnection().get(0);

               for (Iterator iter2 = cConfig.getSession().iterator(); iter2.hasNext();)
               {
                  SessionConfig sConfig = (SessionConfig) iter2.next();

                  if (sConfig.getId() == null || sConfig.getId().equals(""))
                  {
View Full Code Here

Examples of hermes.config.ConnectionConfig

  private JComboBox comboBox;
  private JTextField sessionName;

  public BasicConnectionPanel(String serverUrlProperty, FactoryConfig factoryConfig, HermesConfig config) {
    this.factoryConfig = factoryConfig;
    ConnectionConfig connectionConfig = factoryConfig.getConnection().get(0) ;
    SessionConfig sessionConfig = connectionConfig.getSession().get(0) ;
    setLayout(new FormLayout(new ColumnSpec[] {
        FormFactory.RELATED_GAP_COLSPEC,
        ColumnSpec.decode("max(41dlu;default)"),
        FormFactory.RELATED_GAP_COLSPEC,
        ColumnSpec.decode("118dlu:grow"),
        ColumnSpec.decode("22dlu"),},
      new RowSpec[] {
        FormFactory.RELATED_GAP_ROWSPEC,
        FormFactory.DEFAULT_ROWSPEC,
        FormFactory.RELATED_GAP_ROWSPEC,
        FormFactory.DEFAULT_ROWSPEC,
        FormFactory.RELATED_GAP_ROWSPEC,
        FormFactory.DEFAULT_ROWSPEC,
        FormFactory.RELATED_GAP_ROWSPEC,
        FormFactory.DEFAULT_ROWSPEC,
        FormFactory.RELATED_GAP_ROWSPEC,
        FormFactory.DEFAULT_ROWSPEC,
        FormFactory.RELATED_GAP_ROWSPEC,
        FormFactory.DEFAULT_ROWSPEC,
        FormFactory.RELATED_GAP_ROWSPEC,
        FormFactory.DEFAULT_ROWSPEC,}));
   
    JLabel lblName = new JLabel("Name:");
    lblName.setHorizontalAlignment(SwingConstants.RIGHT);
    add(lblName, "2, 2, right, default");
   
    sessionName = new JTextField();
    add(sessionName, "4, 2, fill, default");
    sessionName.setColumns(10);

    JLabel lblServerurl = new JLabel(getServerUrlLabel());
    lblServerurl.setHorizontalAlignment(SwingConstants.RIGHT);
    add(lblServerurl, "2, 4, right, default");

    serverURL = new JTextField();
    serverURL.setText(getValueOf(serverUrlProperty));
    add(serverURL, "4, 4, fill, default");
    serverURL.setColumns(10);

    JLabel lblUsername = new JLabel("Username:");
    lblUsername.setHorizontalAlignment(SwingConstants.RIGHT);
    add(lblUsername, "2, 6, right, default");

    username = new JTextField(connectionConfig.getUsername());
    add(username, "4, 6, fill, default");
    username.setColumns(10);

    JLabel lblPassword = new JLabel("Password:");
    lblPassword.setHorizontalAlignment(SwingConstants.RIGHT);
    add(lblPassword, "2, 8, right, default");

    password = new JPasswordField(connectionConfig.getPassword()) ;
    add(password, "4, 8, fill, default");
    password.setColumns(10);

    JLabel lblClientid = new JLabel("ClientID:");
    lblClientid.setHorizontalAlignment(SwingConstants.RIGHT);
    add(lblClientid, "2, 10, right, default");

    clientID = new JTextField(connectionConfig.getClientID());
    add(clientID, "4, 10, fill, default");
    clientID.setColumns(10);

    JLabel lblClassloader = new JLabel("ClassLoader:");
    lblClassloader.setHorizontalAlignment(SwingConstants.RIGHT);
View Full Code Here

Examples of hermes.config.ConnectionConfig

  public boolean isValid() {
    return !TextUtils.isEmpty(sessionName.getText()) ;
  }
 
  public void setValues(FactoryConfig config) {
    ConnectionConfig connectionConfig = HermesBrowser.getConfigDAO().getFactory().createConnectionConfig() ;
    SessionConfig sessionConfig = HermesBrowser.getConfigDAO().getFactory().createSessionConfig() ;
   
    connectionConfig.setUsername(getUsername()) ;
    connectionConfig.setPassword(getPassword()) ;
    connectionConfig.setClientID(getClientID()) ;
   
    sessionConfig.setId(sessionName.getText()) ;
   
    connectionConfig.getSession().add(sessionConfig) ;
    config.getConnection().add(connectionConfig) ;
  }
View Full Code Here

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

    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

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

    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

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

  }

  @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

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

  }

  @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

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

        .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

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

  @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

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

    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
TOP
Copyright © 2018 www.massapi.com. 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.