Package org.apache.activemq.transport.discovery.simple

Examples of org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent


    private void runTest(final long taskRunnerDelay, long timeout)
            throws Exception {
        // Add a network connector to the local broker that will create a bridge
        // to the remote broker.
        DiscoveryNetworkConnector dnc = new DiscoveryNetworkConnector();
        SimpleDiscoveryAgent da = new SimpleDiscoveryAgent();
        da.setServices(REMOTE_BROKER_URL);
        dnc.setDiscoveryAgent(da);
        localBroker.addNetworkConnector(dnc);

        // Before starting the local broker, intercept the task runner factory
        // so that the
View Full Code Here


        // Start a bridge from broker1 to broker2. The bridge delays returning
        // from start until after the bridge failure has been processed;
        // this leaves the first bridge creation attempt recorded as active,
        // even though it failed.
        final SimpleDiscoveryAgent da = new SimpleDiscoveryAgent();
        da.setServices(new URI[] { broker2.getVmConnectorURI() });

        final CountDownLatch attemptLatch = new CountDownLatch(3);
        final CountDownLatch removedLatch = new CountDownLatch(1);

        DiscoveryNetworkConnector nc = new DiscoveryNetworkConnector() {
View Full Code Here

        dnc.setNetworkTTL(1);
        dnc.setBrokerName("TestBroker");
        dnc.setName("Broker1Connector");
        dnc.setDynamicOnly(true);

        SimpleDiscoveryAgent discoveryAgent = new SimpleDiscoveryAgent();
        String remoteUrl = "tcp://localhost:4501";
        discoveryAgent.setServices(remoteUrl);

        dnc.setDiscoveryAgent(discoveryAgent);

        broker.addNetworkConnector(dnc);
        dnc.start();
View Full Code Here

        dnc.setNetworkTTL(1);
        dnc.setBrokerName("TestBroker");
        dnc.setName("Broker1Connector");
        dnc.setDynamicOnly(true);

        SimpleDiscoveryAgent discoveryAgent = new SimpleDiscoveryAgent();
        String remoteUrl = "tcp://localhost:4500";
        discoveryAgent.setServices(remoteUrl);

        dnc.setDiscoveryAgent(discoveryAgent);

        broker.addNetworkConnector(dnc);
        dnc.start();
View Full Code Here

        dnc.setNetworkTTL(1);
        dnc.setBrokerName("TestBroker");
        dnc.setName("Broker1Connector");
        dnc.setDynamicOnly(true);

        SimpleDiscoveryAgent discoveryAgent = new SimpleDiscoveryAgent();
        String remoteUrl = "tcp://localhost:4501";
        discoveryAgent.setServices(remoteUrl);

        dnc.setDiscoveryAgent(discoveryAgent);

        broker.addNetworkConnector(dnc);
        dnc.start();
View Full Code Here

        dnc.setNetworkTTL(1);
        dnc.setBrokerName("TestBroker");
        dnc.setName("Broker1Connector");
        dnc.setDynamicOnly(true);

        SimpleDiscoveryAgent discoveryAgent = new SimpleDiscoveryAgent();
        String remoteUrl = "tcp://localhost:4500";
        discoveryAgent.setServices(remoteUrl);

        dnc.setDiscoveryAgent(discoveryAgent);

        broker.addNetworkConnector(dnc);
        dnc.start();
View Full Code Here

    private void runTest(final long taskRunnerDelay, long timeout)
            throws Exception {
        // Add a network connector to the local broker that will create a bridge
        // to the remote broker.
        DiscoveryNetworkConnector dnc = new DiscoveryNetworkConnector();
        SimpleDiscoveryAgent da = new SimpleDiscoveryAgent();
        da.setServices(remoteBroker.getTransportConnectors().get(0).getPublishableConnectString());
        dnc.setDiscoveryAgent(da);
        localBroker.addNetworkConnector(dnc);

        // Before starting the local broker, intercept the task runner factory
        // so that the
View Full Code Here

        // Start a bridge from broker1 to broker2. The bridge delays returning
        // from start until after the bridge failure has been processed;
        // this leaves the first bridge creation attempt recorded as active,
        // even though it failed.
        final SimpleDiscoveryAgent da = new SimpleDiscoveryAgent();
        da.setServices(new URI[] { broker2.getVmConnectorURI() });

        final CountDownLatch attemptLatch = new CountDownLatch(3);
        final CountDownLatch removedLatch = new CountDownLatch(1);

        DiscoveryNetworkConnector nc = new DiscoveryNetworkConnector() {
View Full Code Here

    private void runTest(final long taskRunnerDelay, long timeout)
            throws Exception {
        // Add a network connector to the local broker that will create a bridge
        // to the remote broker.
        DiscoveryNetworkConnector dnc = new DiscoveryNetworkConnector();
        SimpleDiscoveryAgent da = new SimpleDiscoveryAgent();
        da.setServices(remoteBroker.getTransportConnectors().get(0).getPublishableConnectString());
        dnc.setDiscoveryAgent(da);
        localBroker.addNetworkConnector(dnc);

        // Before starting the local broker, intercept the task runner factory
        // so that the
View Full Code Here

TOP

Related Classes of org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent

Copyright © 2018 www.massapicom. 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.