Examples of Fabric8Connector


Examples of org.fusesource.ide.fabric8.core.connector.Fabric8Connector

 
  @Test
  public void testRootContainerJMXUrl() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      assertNotNull("Root container has no JMX url (null)?!", container.getJMXUrl());   
      System.out.println("JMX URL for container 'root' : " + container.getJMXUrl());
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.connector.Fabric8Connector

 
  @Test
  public void testRootContainerWebUrl() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      assertNotNull("Root container has no web url (null)?!", container.getJMXUrl());   
      System.out.println("Web URL for container 'root' : " + container.getContainerWebURL());
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.connector.Fabric8Connector

 
  @Test
  public void testRootContainerDebugPort() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      System.out.println("Debug port for container 'root' : " + container.getDebugPort());
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.connector.Fabric8Connector

 
  @Test
  public void testRootContainerManaged() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getContainer("root");
      assertNotNull("getContainer('root') returned NULL!", container);
     
      assertNotNull("Root container isManaged returns null?!", container.isManaged());   
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.connector.Fabric8Connector

 
  @Test
  public void testGetCurrentContainer() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getCurrentContainer();
      assertNotNull("getCurrentContainer() returned NULL!", container);
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.connector.Fabric8Connector

 
  @Test
  public void testStartContainer() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);

      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      ContainerDTO container = fabric8.getCurrentContainer();
      assertNotNull("getCurrentContainer() returned NULL!", container);
     
      // TODO: create a new container, start it and check if state is started, delete container
      fabric8.startContainer(container);
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
  }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.connector.Fabric8Connector

  /**
   * does the initialization
   */
  protected void initialize() {
    FabricPlugin.getLogger().debug("Starting to connect Fabric on: " + url);
    this.con = new Fabric8Connector(JolokiaFabric8Connector.getFabric8Connector(details.getUserName(), details.getPassword(), url));
  }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.connector.Fabric8Connector

   
  @Test
  public void testConnection() throws Exception {
      if (!this.doTests) return;
    Fabric8ConnectorType connectorType = Fabric8TestHelpers.getJolokiaConnector();
    Fabric8Connector con = new Fabric8Connector(connectorType);
    try {
      assertNotNull("Connector is null!", con);
      con.connect();
      assertNotNull("Connector Type is null!", con.getConnection());
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect()
    }
  } 
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.