Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.SessionInfo


                    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

        this.sessions.add(session);
        addMessageDispatcher(session);
        if (started.get()) {
            session.start();
        }
        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, false);
    }
View Full Code Here

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

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

        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

     * @throws IOException thrown if an error occurs
     */

    public void writePacket(Packet packet, DataOutput dataOut) throws IOException {
        super.writePacket(packet, dataOut);
        SessionInfo info = (SessionInfo) packet;
        super.writeUTF(info.getClientId(), dataOut);
        dataOut.writeShort(info.getSessionId());
        dataOut.writeLong(info.getStartTime());
        dataOut.writeBoolean(info.isStarted());
        dataOut.writeBoolean(info.isReceiptRequired());
        dataOut.writeByte(info.getSessionMode());

    }
View Full Code Here

        this.sessions.add(session);
        addMessageDispatcher(session);
        if (started.get()) {
            session.start();
        }
        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, false);
    }
View Full Code Here

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

    private SessionInfo createSessionInfo(ActiveMQSession session) {
        SessionInfo info = new SessionInfo();
        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.