org.objectweb.joram.client.jms
Class MultiSessionConsumer
java.lang.Object
org.objectweb.joram.client.jms.MessageConsumerListener
org.objectweb.joram.client.jms.MultiSessionConsumer
- All Implemented Interfaces:
- javax.jms.ConnectionConsumer, ReplyListener
public class MultiSessionConsumer
- extends MessageConsumerListener
- implements javax.jms.ConnectionConsumer
The MultiSessionConsumer is threaded (see MessageDispatcher)
because the session pool can hang if there is no more
available ServerSession.
Constructor Summary |
MultiSessionConsumer(boolean queueMode,
boolean durable,
java.lang.String selector,
java.lang.String targetName,
javax.jms.ServerSessionPool sessionPool,
int queueMessageReadMax,
int topicActivationThreshold,
int topicPassivationThreshold,
int topicAckBufferMax,
RequestMultiplexer reqMultiplexer,
Connection connection,
int maxMessages)
|
Methods inherited from class org.objectweb.joram.client.jms.MessageConsumerListener |
ack, activateListener, activateMessageInput, getMessageListener, getQueueMode, getStatus, getTargetName, isClosed, onMessage, passivateMessageInput, replyAborted, replyReceived, setStatus, start |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final org.objectweb.util.monolog.api.Logger logger
sessPool
private javax.jms.ServerSessionPool sessPool
cnx
private Connection cnx
maxMsgs
private int maxMsgs
repliesIn
private Queue repliesIn
nbActivatedListeners
private int nbActivatedListeners
- Number of simultaneously activated
listeners.
msgDispatcher
private MultiSessionConsumer.MessageDispatcher msgDispatcher
MultiSessionConsumer
MultiSessionConsumer(boolean queueMode,
boolean durable,
java.lang.String selector,
java.lang.String targetName,
javax.jms.ServerSessionPool sessionPool,
int queueMessageReadMax,
int topicActivationThreshold,
int topicPassivationThreshold,
int topicAckBufferMax,
RequestMultiplexer reqMultiplexer,
Connection connection,
int maxMessages)
- Parameters:
consumer
- listener
- ackMode
- queueMessageReadMax
- topicActivationThreshold
- topicPassivationThreshold
- topicAckBufferMax
- reqMultiplexer
-
pushMessages
public void pushMessages(ConsumerMessages cm)
throws javax.jms.JMSException
- Description copied from class:
MessageConsumerListener
- 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)
- Specified by:
pushMessages
in class MessageConsumerListener
- 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
- Description copied from class:
MessageConsumerListener
- Called by Session.
- Specified by:
close
in interface javax.jms.ConnectionConsumer
- Overrides:
close
in class MessageConsumerListener
- Throws:
javax.jms.JMSException
onMessage
public void onMessage(Message msg,
javax.jms.MessageListener listener,
int ackMode)
throws javax.jms.JMSException
- Specified by:
onMessage
in class MessageConsumerListener
- Throws:
javax.jms.JMSException
Copyright © 2010 ScalAgent D.T.. All Rights Reserved.