Package org.apache.activemq.network

Examples of org.apache.activemq.network.NetworkConnector.stop()


    service.setUseJmx(true);
    NetworkConnector connector = service.addNetworkConnector("multicast://default");
    service.start();
   
    service.removeNetworkConnector(connector);
    connector.stop();
    service.stop();
  }
 
  public void testAddRemoveNetworkWithoutJMX() throws Exception {
    BrokerService service = new BrokerService();
View Full Code Here


    service.setUseJmx(false);
    NetworkConnector connector = service.addNetworkConnector("multicast://default");
    service.start();
   
    service.removeNetworkConnector(connector);
    connector.stop();
    service.stop();
  }
}
View Full Code Here

                MAX_TEST_TIME, TimeUnit.MILLISECONDS);

        // Restart the network connector and verify that the bridge is
        // re-established. The pause between start/stop is to account for the
        // asynchronous closure.
        nc.stop();
        Thread.sleep(STOP_DELAY);
        nc.start();

        waitForBridge(broker1.getBrokerName(), broker2.getBrokerName(),
                MAX_TEST_TIME, TimeUnit.MILLISECONDS);
View Full Code Here

        service.setUseJmx(true);
        NetworkConnector connector = service.addNetworkConnector("multicast://default?group=group-"+System.currentTimeMillis());
        service.start();

        service.removeNetworkConnector(connector);
        connector.stop();
        service.stop();
    }

    public void testAddRemoveNetworkWithoutJMX() throws Exception {
        BrokerService service = new BrokerService();
View Full Code Here

        service.setUseJmx(false);
        NetworkConnector connector = service.addNetworkConnector("multicast://default?group=group-"+System.currentTimeMillis());
        service.start();

        service.removeNetworkConnector(connector);
        connector.stop();
        service.stop();
    }
   
    public void testSystemUsage()
    {
View Full Code Here

        return brokerService.removeConnector(connector);
    }

    public boolean removeNetworkConnector(String connectorName) throws Exception {
        NetworkConnector connector = brokerService.getNetworkConnectorByName(connectorName);
        connector.stop();
        return brokerService.removeNetworkConnector(connector);
    }

    public void addTopic(String name) throws Exception {
        broker.addDestination(getConnectionContext(broker.getContextBroker()), new ActiveMQTopic(name));
View Full Code Here

        service.setUseJmx(true);
        NetworkConnector connector = service.addNetworkConnector("multicast://default?group=group-"+System.currentTimeMillis());
        service.start();

        service.removeNetworkConnector(connector);
        connector.stop();
        service.stop();
    }

    public void testAddRemoveNetworkWithoutJMX() throws Exception {
        BrokerService service = new BrokerService();
View Full Code Here

        service.setUseJmx(false);
        NetworkConnector connector = service.addNetworkConnector("multicast://default?group=group-"+System.currentTimeMillis());
        service.start();

        service.removeNetworkConnector(connector);
        connector.stop();
        service.stop();
    }
   
    public void testSystemUsage()
    {
View Full Code Here

    public boolean removeNetworkConnector(String connectorName) throws Exception {
        NetworkConnector connector = brokerService.getNetworkConnectorByName(connectorName);
        if (connector == null) {
            throw new NoSuchElementException("Not connector matched the given name: " + connectorName);
        }
        connector.stop();
        return brokerService.removeNetworkConnector(connector);
    }

    public void addTopic(String name) throws Exception {
        safeGetBroker().getContextBroker().addDestination(BrokerSupport.getConnectionContext(safeGetBroker().getContextBroker()), new ActiveMQTopic(name),true);
View Full Code Here

                MAX_TEST_TIME, TimeUnit.MILLISECONDS);

        // Restart the network connector and verify that the bridge is
        // re-established. The pause between start/stop is to account for the
        // asynchronous closure.
        nc.stop();
        Thread.sleep(STOP_DELAY);
        nc.start();

        waitForBridge(broker1.getBrokerName(), broker2.getBrokerName(),
                MAX_TEST_TIME, TimeUnit.MILLISECONDS);
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.