|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.client.jms.MessageConsumerListener
abstract class MessageConsumerListener
This class listens to replies asynchronously returned by the user proxy for a message consumer.
Nested Class Summary | |
---|---|
private static class |
MessageConsumerListener.ReceiveStatus
|
protected static class |
MessageConsumerListener.Status
Status of the message consumer listener. |
Field Summary | |
---|---|
private boolean |
durable
|
private javax.jms.MessageListener |
listener
|
static org.objectweb.util.monolog.api.Logger |
logger
|
private int |
messageCount
The number of messages which are in queue (Session.qin) waiting for being consumed. |
private java.util.Vector |
messagesToAck
|
private int |
queueMessageReadMax
|
private boolean |
queueMode
|
private int |
receiveStatus
The receive status of this message listener: - WAIT_FOR_REPLY if a reply is expected from the destination - CONSUMING_REPLY if a reply is being consumed and no new request has been sent |
private int |
requestId
The identifier of the subscription request. |
private RequestMultiplexer |
rm
|
private java.lang.String |
selector
|
private int |
status
|
private java.lang.String |
targetName
|
private int |
topicAckBufferMax
|
private int |
topicActivationThreshold
|
private boolean |
topicMsgInputPassivated
Indicates whether the topic message input has been passivated or not. |
private int |
topicPassivationThreshold
|
Constructor Summary | |
---|---|
MessageConsumerListener(boolean queueMode,
boolean durable,
java.lang.String selector,
java.lang.String targetName,
javax.jms.MessageListener listener,
int queueMessageReadMax,
int topicActivationThreshold,
int topicPassivationThreshold,
int topicAckBufferMax,
RequestMultiplexer reqMultiplexer)
|
Method Summary | |
---|---|
(package private) void |
ack(java.lang.String msgId,
int ackMode)
|
private void |
acknowledge(int threshold)
|
protected void |
activateListener(Message msg,
javax.jms.MessageListener listener,
int ackMode)
|
(package private) void |
activateMessageInput()
|
void |
close()
Called by Session. |
private int |
decreaseMessageCount(int ackMode)
Decrease the message count. |
javax.jms.MessageListener |
getMessageListener()
|
boolean |
getQueueMode()
|
protected int |
getStatus()
|
java.lang.String |
getTargetName()
|
boolean |
isClosed()
|
void |
onMessage(Message msg,
int ackMode)
Called by Session (standard JMS, mono-threaded |
abstract void |
onMessage(Message msg,
javax.jms.MessageListener listener,
int ackMode)
|
(package private) void |
passivateMessageInput()
|
abstract void |
pushMessages(ConsumerMessages cm)
Pushes the received messages. |
void |
replyAborted(int requestId)
|
boolean |
replyReceived(AbstractJmsReply reply)
Called by RequestMultiplexer. |
private void |
setReceiveStatus(int s)
|
protected void |
setStatus(int status)
|
(package private) void |
start()
Called by Session. |
private void |
subscribe(java.lang.String[] toAck)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static org.objectweb.util.monolog.api.Logger logger
private boolean queueMode
private boolean durable
private java.lang.String selector
private java.lang.String targetName
private volatile int requestId
private int status
private java.util.Vector messagesToAck
private volatile int messageCount
private volatile int receiveStatus
private boolean topicMsgInputPassivated
private int queueMessageReadMax
private RequestMultiplexer rm
private int topicActivationThreshold
private int topicPassivationThreshold
private int topicAckBufferMax
private javax.jms.MessageListener listener
Constructor Detail |
---|
MessageConsumerListener(boolean queueMode, boolean durable, java.lang.String selector, java.lang.String targetName, javax.jms.MessageListener listener, int queueMessageReadMax, int topicActivationThreshold, int topicPassivationThreshold, int topicAckBufferMax, RequestMultiplexer reqMultiplexer)
Method Detail |
---|
protected final int getStatus()
protected void setStatus(int status)
private void setReceiveStatus(int s)
private int decreaseMessageCount(int ackMode) throws javax.jms.JMSException
javax.jms.JMSException
void start() throws javax.jms.JMSException
javax.jms.JMSException
private void subscribe(java.lang.String[] toAck) throws javax.jms.JMSException
javax.jms.JMSException
public void close() throws javax.jms.JMSException
javax.jms.JMSException
private void acknowledge(int threshold)
public boolean replyReceived(AbstractJmsReply reply) throws AbortedRequestException
replyReceived
in interface ReplyListener
AbortedRequestException
public abstract void pushMessages(ConsumerMessages cm) throws javax.jms.JMSException
cm
-
javax.jms.JMSException
public void replyAborted(int requestId)
replyAborted
in interface ReplyListener
public boolean isClosed()
public final javax.jms.MessageListener getMessageListener()
public final boolean getQueueMode()
public final java.lang.String getTargetName()
protected void activateListener(Message msg, javax.jms.MessageListener listener, int ackMode) throws javax.jms.JMSException
javax.jms.JMSException
public abstract void onMessage(Message msg, javax.jms.MessageListener listener, int ackMode) throws javax.jms.JMSException
javax.jms.JMSException
public void onMessage(Message msg, int ackMode) throws javax.jms.JMSException
javax.jms.JMSException
void ack(java.lang.String msgId, int ackMode) throws javax.jms.JMSException
javax.jms.JMSException
void activateMessageInput() throws javax.jms.JMSException
javax.jms.JMSException
void passivateMessageInput() throws javax.jms.JMSException
javax.jms.JMSException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |