|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mq.SpyMessageConsumer
This class implements javax.jms.MessageConsumer.
Field Summary | |
protected boolean |
closed
Are we closed ? |
protected Thread |
listenerThread
The listener thread |
protected boolean |
listening
Are we listening |
protected boolean |
receiving
Are we receiving a message |
SpySession |
session
Link to my session |
protected Object |
stateLock
The state lock |
Subscription |
subscription
The subscription structure should be fill out by the descendent |
protected boolean |
waitingForMessage
Are we waiting for a message |
Method Summary | |
void |
addMessage(SpyMessage message)
Add a message |
void |
close()
|
javax.jms.MessageListener |
getMessageListener()
|
String |
getMessageSelector()
|
Subscription |
getSubscription()
Get the subscription |
protected boolean |
isListening()
Are we listening |
javax.jms.Message |
receive()
|
javax.jms.Message |
receive(long timeOut)
|
javax.jms.Message |
receiveNoWait()
|
void |
restartProcessing()
Restarts the processing of the messages in case of a recovery |
void |
run()
|
protected void |
sessionConsumerProcessMessage(SpyMessage message)
|
void |
setMessageListener(javax.jms.MessageListener listener)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public SpySession session
public Subscription subscription
protected boolean closed
protected Object stateLock
protected boolean receiving
protected boolean waitingForMessage
protected boolean listening
protected Thread listenerThread
Method Detail |
public Subscription getSubscription()
getSubscription
in interface SpyConsumer
public void addMessage(SpyMessage message) throws javax.jms.JMSException
addMessage
in interface SpyConsumer
message
- the message to add
javax.jms.JMSException
- for any errorpublic void restartProcessing()
public void setMessageListener(javax.jms.MessageListener listener) throws javax.jms.JMSException
setMessageListener
in interface javax.jms.MessageConsumer
javax.jms.JMSException
public String getMessageSelector() throws javax.jms.JMSException
getMessageSelector
in interface javax.jms.MessageConsumer
javax.jms.JMSException
public javax.jms.MessageListener getMessageListener() throws javax.jms.JMSException
getMessageListener
in interface javax.jms.MessageConsumer
javax.jms.JMSException
public javax.jms.Message receive() throws javax.jms.JMSException
receive
in interface javax.jms.MessageConsumer
javax.jms.JMSException
public javax.jms.Message receive(long timeOut) throws javax.jms.JMSException
receive
in interface javax.jms.MessageConsumer
javax.jms.JMSException
public javax.jms.Message receiveNoWait() throws javax.jms.JMSException
receiveNoWait
in interface javax.jms.MessageConsumer
javax.jms.JMSException
public void close() throws javax.jms.JMSException
close
in interface javax.jms.MessageConsumer
javax.jms.JMSException
public void run()
public String toString()
protected boolean isListening()
protected void sessionConsumerProcessMessage(SpyMessage message) throws javax.jms.JMSException
javax.jms.JMSException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |