Joram 4.3.32

org.objectweb.joram.client.jms
Class MultiSessionConsumer

java.lang.Object
  extended by org.objectweb.joram.client.jms.MultiSessionConsumer
All Implemented Interfaces:
javax.jms.ConnectionConsumer, ReplyListener

public class MultiSessionConsumer
extends java.lang.Object
implements javax.jms.ConnectionConsumer

The MultiSessionConsumer is threaded (see MessageDispatcher) because the session pool can hang if there is no more available ServerSession.


Nested Class Summary
protected static class MessageConsumerListener.Status
          Status of the message consumer listener.
 
Method Summary
protected  void activateListener(Message msg, javax.jms.MessageListener listener, int ackMode)
           
 void close()
          Called by Session.
 javax.jms.MessageListener getMessageListener()
           
 boolean getQueueMode()
           
 javax.jms.ServerSessionPool getServerSessionPool()
           
protected  int getStatus()
           
 java.lang.String getTargetName()
           
 boolean isClosed()
           
 void onMessage(Message msg, int ackMode)
          Called by Session (standard JMS, mono-threaded
 void onMessage(Message msg, javax.jms.MessageListener listener, int ackMode)
           
 void pushMessages(ConsumerMessages cm)
          Pushes the received messages.
 void replyAborted(int requestId)
           
 boolean replyReceived(AbstractJmsReply reply)
          Called by RequestMultiplexer.
protected  void setStatus(int status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

pushMessages

public void pushMessages(ConsumerMessages cm)
                  throws javax.jms.JMSException
Pushes the received messages. Currently two behaviors: 1- SingleSessionConsumer pushes the message in a single session (standard JMS) 2- MultiSessionConsumer pushes the message in several session (from a session pool)

Throws:
javax.jms.JMSException

getServerSessionPool

public javax.jms.ServerSessionPool getServerSessionPool()
                                                 throws javax.jms.JMSException
Specified by:
getServerSessionPool in interface javax.jms.ConnectionConsumer
Throws:
javax.jms.JMSException

close

public void close()
           throws javax.jms.JMSException
Called by Session.

Specified by:
close in interface javax.jms.ConnectionConsumer
Throws:
javax.jms.JMSException

onMessage

public void onMessage(Message msg,
                      javax.jms.MessageListener listener,
                      int ackMode)
               throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getStatus

protected final int getStatus()

setStatus

protected void setStatus(int status)

replyReceived

public boolean replyReceived(AbstractJmsReply reply)
                      throws AbortedRequestException
Called by RequestMultiplexer.

Specified by:
replyReceived in interface ReplyListener
Returns:
whether the request must be aborted or not.
Throws:
AbortedRequestException

replyAborted

public void replyAborted(int requestId)
Specified by:
replyAborted in interface ReplyListener

isClosed

public boolean isClosed()

getMessageListener

public final javax.jms.MessageListener getMessageListener()

getQueueMode

public final boolean getQueueMode()

getTargetName

public final java.lang.String getTargetName()

activateListener

protected void activateListener(Message msg,
                                javax.jms.MessageListener listener,
                                int ackMode)
                         throws javax.jms.JMSException
Throws:
javax.jms.JMSException

onMessage

public void onMessage(Message msg,
                      int ackMode)
               throws javax.jms.JMSException
Called by Session (standard JMS, mono-threaded

Throws:
javax.jms.JMSException

Joram 4.3.32

Copyright © 2005 Scalagent - All rights reserved