Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.ConsumerInfo


     * @param info
     */
    void addProducer(ProducerInfo info) {
        producers.add(info);
        for (Iterator i = advisoryConsumers.keySet().iterator();i.hasNext();) {
            ConsumerInfo advisory = (ConsumerInfo) i.next();
            generateAdvisory(advisory, info);
        }
    }
View Full Code Here


     * @param info
     */
    void removeProducer(ProducerInfo info) {
        producers.remove(info);
        for (Iterator i = advisoryConsumers.keySet().iterator();i.hasNext();) {
            ConsumerInfo advisory = (ConsumerInfo) i.next();
            generateAdvisory(advisory, info);
        }
    }
View Full Code Here

     * @param info
     */
    void addConnection(ConnectionInfo info) {
        connections.add(info);
        for (Iterator i = advisoryConsumers.keySet().iterator();i.hasNext();) {
            ConsumerInfo advisory = (ConsumerInfo) i.next();
            generateAdvisory(advisory, info);
        }
    }
View Full Code Here

     * @param info
     */
    void removeConnection(ConnectionInfo info) {
        connections.remove(info);
        for (Iterator i = advisoryConsumers.keySet().iterator();i.hasNext();) {
            ConsumerInfo advisory = (ConsumerInfo) i.next();
            generateAdvisory(advisory, info);
        }
    }
View Full Code Here

        assertEquals("queueC", false, queueC.flushMessages().contains(message));
        assertEquals("queueD", true, queueD.flushMessages().contains(message));
    }

    protected void addSubscription(String subject, String selector, BrokerClient client, boolean topic) throws JMSException {
        ConsumerInfo info = createConsumer(subject, selector);
        broker.addMessageConsumer(client, info);
    }
View Full Code Here

     * @since 1.1
     */
    public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector,
                                                       ServerSessionPool sessionPool, int maxMessages) throws JMSException {
        checkClosed();
        ConsumerInfo info = new ConsumerInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setConsumerId(consumerIdGenerator.generateId());
        info.setDestination(ActiveMQMessageTransformation.transformDestination(destination));
        info.setSelector(messageSelector);
        return new ActiveMQConnectionConsumer(this, sessionPool, info, maxMessages);
    }
View Full Code Here

     * @since 1.1
     */
    public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subscriptionName,
                                                              String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException {
        checkClosed();
        ConsumerInfo info = new ConsumerInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setConsumerId(this.consumerIdGenerator.generateId());
        info.setDestination(ActiveMQMessageTransformation.transformDestination(topic));
        info.setSelector(messageSelector);
        info.setConsumerName(subscriptionName);
        return new ActiveMQConnectionConsumer(this, sessionPool, info, maxMessages);
    }
View Full Code Here

     * @see javax.jms.ConnectionConsumer
     */
    public ConnectionConsumer createConnectionConsumer(Topic topic, String messageSelector,
                                                       ServerSessionPool sessionPool, int maxMessages) throws JMSException {
        checkClosed();
        ConsumerInfo info = new ConsumerInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setConsumerId(this.consumerIdGenerator.generateId());
        info.setDestination(ActiveMQMessageTransformation.transformDestination(topic));
        info.setSelector(messageSelector);
        return new ActiveMQConnectionConsumer(this, sessionPool, info, maxMessages);
    }
View Full Code Here

     * @see javax.jms.ConnectionConsumer
     */
    public ConnectionConsumer createConnectionConsumer(Queue queue, String messageSelector,
                                                       ServerSessionPool sessionPool, int maxMessages) throws JMSException {
        checkClosed();
        ConsumerInfo info = new ConsumerInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setConsumerId(this.consumerIdGenerator.generateId());
        info.setDestination(ActiveMQMessageTransformation.transformDestination(queue));
        info.setSelector(messageSelector);
        return new ActiveMQConnectionConsumer(this, sessionPool, info, maxMessages);
    }
View Full Code Here

                sessionInfo.setStarted(true);
                asyncSendPacket(sessionInfo);
                //send consumers
                for (Iterator consumersIterator = session.consumers.iterator(); consumersIterator.hasNext();) {
                    ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer) consumersIterator.next();
                    ConsumerInfo consumerInfo = session.createConsumerInfo(consumer);
                    consumerInfo.setStarted(true);
                    syncSendPacket(consumerInfo);
                }
                //send producers
                for (Iterator producersIterator = session.producers.iterator(); producersIterator.hasNext();) {
                    ActiveMQMessageProducer producer = (ActiveMQMessageProducer) producersIterator.next();
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.message.ConsumerInfo

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.