Package org.activemq.broker.impl

Examples of org.activemq.broker.impl.BrokerClientImpl


        ActiveMQConnectionFactory factory2 = new ActiveMQConnectionFactory("vm://localhost");
        ActiveMQConnection connection2 = (ActiveMQConnection) factory2.createConnection();
        assertNotNull(connection2);
       
        VmTransportChannel transportChannel = (VmTransportChannel) connection.getTransportChannel();
        BrokerClientImpl brokerClient = (BrokerClientImpl)transportChannel.getSendListener();
        Broker broker = brokerClient.getBrokerConnector().getBrokerContainer().getBroker();
       
        VmTransportChannel transportChannel2 = (VmTransportChannel) connection2.getTransportChannel();
        BrokerClientImpl brokerClient2 = (BrokerClientImpl)transportChannel2.getSendListener();
        Broker broker2 = brokerClient2.getBrokerConnector().getBrokerContainer().getBroker();
       
        assertTrue( broker == broker2 );
       
    }
View Full Code Here


        ActiveMQConnectionFactory factory2 = (ActiveMQConnectionFactory) ctx2.lookup("ConnectionFactory");
        ActiveMQConnection connection2 = (ActiveMQConnection) factory2.createConnection();
        assertNotNull(connection2);
       
        VmTransportChannel transportChannel = (VmTransportChannel) connection.getTransportChannel();
        BrokerClientImpl brokerClient = (BrokerClientImpl)transportChannel.getSendListener();
        Broker broker = brokerClient.getBrokerConnector().getBrokerContainer().getBroker();
       
        VmTransportChannel transportChannel2 = (VmTransportChannel) connection2.getTransportChannel();
        BrokerClientImpl brokerClient2 = (BrokerClientImpl)transportChannel2.getSendListener();
        Broker broker2 = brokerClient2.getBrokerConnector().getBrokerContainer().getBroker();
       
        assertTrue( broker == broker2 );
       
    }
View Full Code Here

    protected TransportChannel ensureMulticastChannelIsAvailable(URI remoteLocation, TransportChannel channel, BrokerConnector brokerConnector, boolean created) throws JMSException {
        if (created) {
            BrokerConnectorImpl brokerImpl = (BrokerConnectorImpl) brokerConnector;

            BrokerClientImpl client = new BrokerClientImpl();
            client.initialize(brokerImpl, channel);
            channel.start();
            String brokerClientID = createMulticastClientID();
            channel.setClientID(brokerClientID);

            // lets spoof a consumer for topics which will replicate messages
            // over the multicast transport
            ConnectionInfo info = new ConnectionInfo();
            info.setHostName(IdGenerator.getHostName());
            info.setClientId(brokerClientID);
            info.setStarted(true);
            client.consumeConnectionInfo(info);

            ConsumerInfo consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQTopic(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);

            consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQQueue(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);
        }

        // now lets create a VM channel that the JMS client will use
        // to connect to the embedded brokerConnector
        URI localURI = createURI("vm", remoteLocation);
View Full Code Here

    protected TransportChannel ensureMulticastChannelIsAvailable(URI remoteLocation, TransportChannel channel, BrokerConnector brokerConnector, boolean created) throws JMSException {
        if (created) {
            BrokerConnectorImpl brokerImpl = (BrokerConnectorImpl) brokerConnector;

            BrokerClientImpl client = new BrokerClientImpl();
            client.initialize(brokerImpl, channel);
            channel.start();
            String brokerClientID = createMulticastClientID();
            channel.setClientID(brokerClientID);

            // lets spoof a consumer for topics which will replicate messages
            // over the multicast transport
            ConnectionInfo info = new ConnectionInfo();
            info.setHostName(IdGenerator.getHostName());
            info.setClientId(brokerClientID);
            info.setStarted(true);
            client.consumeConnectionInfo(info);

            ConsumerInfo consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQTopic(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);

            consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQQueue(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);
        }

        // now lets create a VM channel that the JMS client will use
        // to connect to the embedded brokerConnector
        URI localURI = createURI("vm", remoteLocation);
View Full Code Here

        ActiveMQConnectionFactory factory2 = new ActiveMQConnectionFactory("vm://localhost");
        ActiveMQConnection connection2 = (ActiveMQConnection) factory2.createConnection();
        assertNotNull(connection2);
       
        VmTransportChannel transportChannel = (VmTransportChannel) connection.getTransportChannel();
        BrokerClientImpl brokerClient = (BrokerClientImpl)transportChannel.getSendListener();
        Broker broker = brokerClient.getBrokerConnector().getBrokerContainer().getBroker();
       
        VmTransportChannel transportChannel2 = (VmTransportChannel) connection2.getTransportChannel();
        BrokerClientImpl brokerClient2 = (BrokerClientImpl)transportChannel2.getSendListener();
        Broker broker2 = brokerClient2.getBrokerConnector().getBrokerContainer().getBroker();
       
        assertTrue( broker == broker2 );
       
    }
View Full Code Here

        ActiveMQConnectionFactory factory2 = (ActiveMQConnectionFactory) ctx2.lookup("ConnectionFactory");
        ActiveMQConnection connection2 = (ActiveMQConnection) factory2.createConnection();
        assertNotNull(connection2);
       
        VmTransportChannel transportChannel = (VmTransportChannel) connection.getTransportChannel();
        BrokerClientImpl brokerClient = (BrokerClientImpl)transportChannel.getSendListener();
        Broker broker = brokerClient.getBrokerConnector().getBrokerContainer().getBroker();
       
        VmTransportChannel transportChannel2 = (VmTransportChannel) connection2.getTransportChannel();
        BrokerClientImpl brokerClient2 = (BrokerClientImpl)transportChannel2.getSendListener();
        Broker broker2 = brokerClient2.getBrokerConnector().getBrokerContainer().getBroker();
       
        assertTrue( broker == broker2 );
       
    }
View Full Code Here

    protected TransportChannel ensureMulticastChannelIsAvailable(URI remoteLocation, TransportChannel channel, BrokerConnector brokerConnector, boolean created) throws JMSException {
        if (created) {
            BrokerConnectorImpl brokerImpl = (BrokerConnectorImpl) brokerConnector;

            BrokerClientImpl client = new BrokerClientImpl();
            client.initialize(brokerImpl, channel);
            channel.start();
            String brokerClientID = createMulticastClientID();
            channel.setClientID(brokerClientID);

            // lets spoof a consumer for topics which will replicate messages
            // over the multicast transport
            ConnectionInfo info = new ConnectionInfo();
            info.setHostName(IdGenerator.getHostName());
            info.setClientId(brokerClientID);
            info.setStarted(true);
            client.consumeConnectionInfo(info);

            ConsumerInfo consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQTopic(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);

            consumerInfo = new ConsumerInfo();
            consumerInfo.setDestination(new ActiveMQQueue(">"));
            consumerInfo.setNoLocal(true);
            consumerInfo.setClientId(brokerClientID);
            consumerInfo.setConsumerId(idGenerator.generateId());
            consumerInfo.setStarted(true);
            client.consumeConsumerInfo(consumerInfo);
        }

        // now lets create a VM channel that the JMS client will use
        // to connect to the embedded brokerConnector
        URI localURI = createURI("vm", remoteLocation);
View Full Code Here

TOP

Related Classes of org.activemq.broker.impl.BrokerClientImpl

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.