Package org.apache.activemq.network

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


    }

    public void connectTo(BrokerAgent remoteBroker) throws Exception {
        NetworkConnector connector = getBroker().addNetworkConnector("rendezvous");
        if (isStarted()) {
            connector.start();
        }
    }

    protected BrokerService createBroker() throws Exception {
        BrokerService answer = new BrokerService();
View Full Code Here


    public void connectTo(BrokerAgent remoteBroker) throws Exception {
        String remoteURI = "static://"+remoteBroker.getConnectionURI();
        log.info("Broker is connecting to network using: " + remoteURI);
        NetworkConnector connector = getBroker().addNetworkConnector(remoteURI);
        if (started) {
            connector.start();
        }
    }

    public void start() throws Exception {
        started = true;
View Full Code Here

            for (Iterator iter = getNetworkConnectors().iterator(); iter.hasNext();) {
                NetworkConnector connector = (NetworkConnector) iter.next();
                connector.setBrokerName(getBrokerName());
                connector.setDurableDestinations(getBroker().getDurableDestinations());
                connector.start();
            }
           
            for (Iterator iter = getProxyConnectors().iterator(); iter.hasNext();) {
                ProxyConnector connector = (ProxyConnector) iter.next();
                connector.start();
View Full Code Here

                connector.start();
            }
           
            for (Iterator iter = getProxyConnectors().iterator(); iter.hasNext();) {
                ProxyConnector connector = (ProxyConnector) iter.next();
                connector.start();
            }
           
            for (Iterator iter = jmsConnectors.iterator(); iter.hasNext();) {
                JmsConnector connector = (JmsConnector) iter.next();
                connector.start();
View Full Code Here

                connector.start();
            }
           
            for (Iterator iter = jmsConnectors.iterator(); iter.hasNext();) {
                JmsConnector connector = (JmsConnector) iter.next();
                connector.start();
            }
           
            if (services != null) {
                for (int i = 0; i < services.length; i++) {
                    Service service = services[i];
View Full Code Here

        startAllBrokers();

        // Start a bridge from broker1 to broker2.
        NetworkConnector nc = bridgeBrokers(broker1.getBrokerName(),
                broker2.getBrokerName());
        nc.start();

        waitForBridge(broker1.getBrokerName(), broker2.getBrokerName(),
                MAX_TEST_TIME, TimeUnit.MILLISECONDS);

        // Restart the network connector and verify that the bridge is
View Full Code Here

        // 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

        URI ncUri = new URI("static:(" + connector.getConnectUri().toString() + ")");
        NetworkConnector nc = new DiscoveryNetworkConnector(ncUri);
        nc.setDuplex(true);
        remoteBroker.addNetworkConnector(nc);
        nc.start();
    }

    protected void tearDown() throws Exception {
        if (remoteBroker.isStarted()) {
            remoteBroker.stop();
View Full Code Here

        LOG.info("Complete the mesh - 0->2");

        // shorter route
        NetworkConnector nc = bridge("Broker0", "Broker2");
        nc.setBrokerName("Broker0");
        nc.start();


        if (!DUPLEX) {
            LOG.info("... complete the mesh - 2->0");
            nc = bridge("Broker2", "Broker0");
View Full Code Here

        if (!DUPLEX) {
            LOG.info("... complete the mesh - 2->0");
            nc = bridge("Broker2", "Broker0");
            nc.setBrokerName("Broker2");
            nc.start();
        }

        // wait for consumers to get propagated
        for (int i = 0; i < BROKER_COUNT; i++) {
          assertExactConsumersConnect("Broker" + i, 3, 1, TIMEOUT);
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.