Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.ProducerInfo


                    asyncSendPacket(consumerInfo, false);
                }
                //send producers
                for (Iterator producersIterator = session.producers.iterator(); producersIterator.hasNext();) {
                    ActiveMQMessageProducer producer = (ActiveMQMessageProducer) producersIterator.next();
                    ProducerInfo producerInfo = session.createProducerInfo(producer);
                    producerInfo.setStarted(true);
                    asyncSendPacket(producerInfo, false);
                }
                //send the current capacity
                CapacityMonitorEvent event = boundedQueueManager.generateCapacityMonitorEvent();
                if (event != null){
View Full Code Here


     * @throws JMSException
     */
    protected void addProducer(ActiveMQMessageProducer producer) throws JMSException {
        // ensure that the connection info is sent to the broker
        connection.sendConnectionInfoToBroker();
        ProducerInfo info = createProducerInfo(producer);
        info.setStarted(true);
        this.connection.syncSendPacket(info);
        this.producers.add(producer);
    }
View Full Code Here

     * @throws JMSException
     */
    protected void removeProducer(ActiveMQMessageProducer producer) throws JMSException {
        this.producers.remove(producer);
        if (!closed.get()) {
            ProducerInfo info = createProducerInfo(producer);
            info.setStarted(false);
            this.connection.asyncSendPacket(info, false);
        }
    }
View Full Code Here

            this.connection.asyncSendPacket(info, false);
        }
    }

    protected ProducerInfo createProducerInfo(ActiveMQMessageProducer producer) throws JMSException {
        ProducerInfo info = new ProducerInfo();
        info.setProducerId(producer.getProducerId());
        info.setClientId(connection.clientID);
        info.setSessionId(this.sessionId);
        info.setDestination(producer.defaultDestination);
        info.setId(this.packetIdGenerator.generateId());
        info.setStartTime(producer.getStartTime());
        return info;
    }
View Full Code Here

                    asyncSendPacket(consumerInfo, false);
                }
                //send producers
                for (Iterator producersIterator = session.producers.iterator(); producersIterator.hasNext();) {
                    ActiveMQMessageProducer producer = (ActiveMQMessageProducer) producersIterator.next();
                    ProducerInfo producerInfo = session.createProducerInfo(producer);
                    producerInfo.setStarted(true);
                    asyncSendPacket(producerInfo, false);
                }
                //send the current capacity
                CapacityMonitorEvent event = boundedQueueManager.generateCapacityMonitorEvent();
                if (event != null){
View Full Code Here

                            ConsumerInfo info = (ConsumerInfo) packet;
                            consumeConsumerInfo(info);
                            break;
                        }
                        case Packet.PRODUCER_INFO : {
                            ProducerInfo info = (ProducerInfo) packet;
                            consumeProducerInfo(info);
                            break;
                        }
                        case Packet.SESSION_INFO : {
                            SessionInfo info = (SessionInfo) packet;
View Full Code Here

                  for (Iterator i = consumers.iterator();i.hasNext();) {
                      ConsumerInfo ci = (ConsumerInfo) i.next();
                      ci.setClientId(info.getClientId());
                  }
                  for (Iterator i = producers.iterator();i.hasNext();) {
                      ProducerInfo pi = (ProducerInfo) i.next();
                      pi.setClientId(info.getClientId());
                  }
                 
                  for( int i=0; i < dispatchQueue.size(); i++ ) {
                    ActiveMQMessage msg = (ActiveMQMessage) dispatchQueue.get(i);
                    dispatch(msg);
View Full Code Here

                        ConsumerInfo info = (ConsumerInfo) i.next();
                        info.setStarted(false);
                        this.brokerConnector.deregisterMessageConsumer(this, info);
                    }
                    for (Iterator i = producers.iterator();i.hasNext();) {
                        ProducerInfo info = (ProducerInfo) i.next();
                        info.setStarted(false);
                        this.brokerConnector.deregisterMessageProducer(this, info);
                    }
                    for (Iterator i = sessions.iterator();i.hasNext();) {
                        SessionInfo info = (SessionInfo) i.next();
                        info.setStarted(false);
                        this.brokerConnector.deregisterSession(this, info);
                    }
                    for (Iterator i = transactions.iterator();i.hasNext();) {
                        this.brokerConnector.rollbackTransaction(this, i.next().toString());
                    }
View Full Code Here

                            ConsumerInfo info = (ConsumerInfo) packet;
                            consumeConsumerInfo(info);
                            break;
                        }
                        case Packet.PRODUCER_INFO : {
                            ProducerInfo info = (ProducerInfo) packet;
                            consumeProducerInfo(info);
                            break;
                        }
                        case Packet.SESSION_INFO : {
                            SessionInfo info = (SessionInfo) packet;
View Full Code Here

                    for (Iterator i = consumers.iterator();i.hasNext();) {
                        ConsumerInfo ci = (ConsumerInfo) i.next();
                        ci.setClientId(info.getClientId());
                    }
                    for (Iterator i = producers.iterator();i.hasNext();) {
                        ProducerInfo pi = (ProducerInfo) i.next();
                        pi.setClientId(info.getClientId());
                    }
                    for (int i = 0;i < dispatchQueue.size();i++) {
                        ActiveMQMessage msg = (ActiveMQMessage) dispatchQueue.get(i);
                        dispatch(msg);
                    }
View Full Code Here

TOP

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

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.