Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.SessionInfo


        try {
            //send the Connection info again
            sendConnectionInfoToBroker(sendConnectionInfoTimeout, true, false);
            for (Iterator iter = sessions.iterator(); iter.hasNext();) {
                ActiveMQSession session = (ActiveMQSession) iter.next();
                SessionInfo sessionInfo = createSessionInfo(session);
                sessionInfo.setStarted(true);
                asyncSendPacket(sessionInfo, false);
                //send consumers
                for (Iterator consumersIterator = session.consumers.iterator(); consumersIterator.hasNext();) {
                    ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer) consumersIterator.next();
                    ConsumerInfo consumerInfo = session.createConsumerInfo(consumer);
View Full Code Here


    /**
     * @return a new Packet instance
     */

    public Packet createPacket() {
        return new SessionInfo();
    }
View Full Code Here

     * @throws IOException
     */

    public void buildPacket(Packet packet, DataInput dataIn) throws IOException {
        super.buildPacket(packet, dataIn);
        SessionInfo info = (SessionInfo) packet;
        info.setClientId(dataIn.readUTF());
        info.setSessionId(dataIn.readShort());
        info.setStartTime(dataIn.readLong());
        info.setStarted(dataIn.readBoolean());
        info.setReceiptRequired(dataIn.readBoolean());
        info.setSessionMode(dataIn.readByte());
    }
View Full Code Here

                            ProducerInfo info = (ProducerInfo) packet;
                            consumeProducerInfo(info);
                            break;
                        }
                        case Packet.SESSION_INFO : {
                            SessionInfo info = (SessionInfo) packet;
                            consumeSessionInfo(info);
                            break;
                        }
                        case Packet.ACTIVEMQ_CONNECTION_INFO : {
                            ConnectionInfo info = (ConnectionInfo) packet;
View Full Code Here

                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

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

                        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

     * @throws JMSException
     */
    protected void addSession(ActiveMQSession session) throws JMSException {
        this.sessions.add(session);
        addMessageDispatcher(session);
        SessionInfo info = createSessionInfo(session);
        info.setStarted(true);
        asyncSendPacket(info);
    }
View Full Code Here

     * @throws JMSException
     */
    protected void removeSession(ActiveMQSession session) throws JMSException {
        this.sessions.remove(session);
        removeMessageDispatcher(session);
        SessionInfo info = createSessionInfo(session);
        info.setStarted(false);
        asyncSendPacket(info);
    }
View Full Code Here

        info.setStarted(false);
        asyncSendPacket(info);
    }

    private SessionInfo createSessionInfo(ActiveMQSession session) {
        SessionInfo info = new SessionInfo();
        info.setId(packetIdGenerator.generateId());
        info.setClientId(clientID);
        info.setSessionId(session.getSessionId());
        info.setStartTime(session.getStartTime());
        return info;
    }
View Full Code Here

TOP

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

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.