Package org.apache.activemq.network

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


    public String addNetworkConnector(String discoveryAddress) throws Exception {
        NetworkConnector connector = brokerService.addNetworkConnector(discoveryAddress);
        if (connector == null) {
            throw new NoSuchElementException("Not connector matched the given name: " + discoveryAddress);
        }
        connector.start();
        return connector.getName();
    }

    public boolean removeConnector(String connectorName) throws Exception {
        TransportConnector connector = brokerService.getConnectorByName(connectorName);
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

            NetworkConnector nc = bridgeBrokers("hub", "spoke" + i);
            nc.setNetworkTTL(1);
            nc.setDuplex(true);
            nc.setConduitSubscriptions(false);
            nc.setStaticallyIncludedDestinations(Arrays.asList(testQueue));
            nc.start();

            ncs[i] = nc;
        }

        waitForBridgeFormation();
View Full Code Here

    public String addNetworkConnector(String discoveryAddress) throws Exception {
        NetworkConnector connector = brokerService.addNetworkConnector(discoveryAddress);
        if (connector == null) {
            throw new NoSuchElementException("Not connector matched the given name: " + discoveryAddress);
        }
        connector.start();
        return connector.getName();
    }

    @Override
    public boolean removeConnector(String connectorName) throws Exception {
View Full Code Here

                    networkConnectorStartExecutor.execute(new Runnable() {
                        @Override
                        public void run() {
                            try {
                                LOG.info("Async start of {}", connector);
                                connector.start();
                            } catch(Exception e) {
                                LOG.error("Async start of network connector: {} failed", connector, e);
                            }
                        }
                    });
View Full Code Here

                                LOG.error("Async start of network connector: {} failed", connector, e);
                            }
                        }
                    });
                } else {
                    connector.start();
                }
            }
            if (networkConnectorStartExecutor != null) {
                // executor done when enqueued tasks are complete
                ThreadPoolUtils.shutdown(networkConnectorStartExecutor);
View Full Code Here

                ThreadPoolUtils.shutdown(networkConnectorStartExecutor);
            }

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

                ProxyConnector connector = iter.next();
                connector.start();
            }
            for (Iterator<JmsConnector> iter = jmsConnectors.iterator(); iter.hasNext();) {
                JmsConnector connector = iter.next();
                connector.start();
            }
            for (Service service : services) {
                configureService(service);
                service.start();
            }
View Full Code Here

        NetworkConnector connector = brokerService.addNetworkConnector(discoveryAddress);
        if (connector == null) {
            throw new NoSuchElementException("Not connector matched the given name: " + discoveryAddress);
        }
        brokerService.registerNetworkConnectorMBean(connector);
        connector.start();
        return connector.getName();
    }

    @Override
    public boolean removeConnector(String connectorName) throws Exception {
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.