Package org.activemq.message

Examples of org.activemq.message.SessionInfo


                if (receipt.getCorrelationId() != packet_id.shortValue()) return false;
                final Short session_packet_id = new Short(PACKET_IDS.getNextShortSequence());
                sessionId = clientIds.getNextShortSequence();
                commandParser.setSessionId(sessionId);

                final SessionInfo info = new SessionInfo();
                info.setStartTime(System.currentTimeMillis());
                info.setId(session_packet_id.shortValue());
                info.setClientId(clientId);
                info.setSessionId(sessionId);
                info.setStarted(true);
                info.setSessionMode(Session.AUTO_ACKNOWLEDGE);
                info.setReceiptRequired(true);

                AsyncHelper.tryUntilNotInterrupted(new AsyncHelper.Helper()
                {
                    public void cycle() throws InterruptedException
                    {
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
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
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

TOP

Related Classes of org.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.