|
Joram ${version} | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.objectweb.joram.client.jms.MessageConsumer
Implements the javax.jms.MessageConsumer interface.
| Field Summary | |
protected Destination |
dest
The destination the consumer gets its messages from. |
protected boolean |
noLocal
true if the subscriber does not wish to consume messages
produced by its connection. |
protected Session |
sess
The session the consumer belongs to. |
| Method Summary | |
protected void |
checkClosed()
|
void |
close()
API method. |
javax.jms.MessageListener |
getMessageListener()
API method. |
java.lang.String |
getMessageSelector()
API method. |
boolean |
getQueueMode()
|
java.lang.String |
getTargetName()
|
javax.jms.Message |
receive()
API method. |
javax.jms.Message |
receive(long timeOut)
API method implemented in subclasses. |
javax.jms.Message |
receiveNoWait()
API method. |
void |
setMessageListener(javax.jms.MessageListener messageListener)
API method. |
java.lang.String |
toString()
Returns a string view of this consumer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Destination dest
protected boolean noLocal
true if the subscriber does not wish to consume messages
produced by its connection.
protected Session sess
| Method Detail |
public final java.lang.String getTargetName()
public final boolean getQueueMode()
protected void checkClosed()
throws javax.jms.IllegalStateException
javax.jms.IllegalStateExceptionpublic java.lang.String toString()
public void setMessageListener(javax.jms.MessageListener messageListener)
throws javax.jms.JMSException
This method must not be called if the connection the consumer belongs to is started, because the session would then be accessed by the thread calling this method and by the thread controlling asynchronous deliveries. This situation is clearly forbidden by the single threaded nature of sessions. Moreover, unsetting a message listener without stopping the connection may lead to the situation where asynchronous deliveries would arrive on the connection, the session or the consumer without being able to reach their target listener!
setMessageListener in interface javax.jms.MessageConsumerjavax.jms.IllegalStateException - If the consumer is closed, or if the
connection is broken.
javax.jms.JMSException - If the request fails for any other reason.
public javax.jms.MessageListener getMessageListener()
throws javax.jms.JMSException
getMessageListener in interface javax.jms.MessageConsumerjavax.jms.IllegalStateException - If the consumer is closed.
javax.jms.JMSException
public final java.lang.String getMessageSelector()
throws javax.jms.JMSException
getMessageSelector in interface javax.jms.MessageConsumerjavax.jms.IllegalStateException - If the consumer is closed.
javax.jms.JMSException
public javax.jms.Message receive(long timeOut)
throws javax.jms.JMSException
receive in interface javax.jms.MessageConsumerjavax.jms.IllegalStateException - If the consumer is closed, or if the
connection is broken.
javax.jms.JMSSecurityException - If the requester is not a READER on the
destination.
javax.jms.JMSException - If the request fails for any other reason.
public javax.jms.Message receive()
throws javax.jms.JMSException
receive in interface javax.jms.MessageConsumerjavax.jms.IllegalStateException - If the consumer is closed, or if the
connection is broken.
javax.jms.JMSSecurityException - If the requester is not a READER on the
destination.
javax.jms.JMSException - If the request fails for any other reason.
public javax.jms.Message receiveNoWait()
throws javax.jms.JMSException
receiveNoWait in interface javax.jms.MessageConsumerjavax.jms.IllegalStateException - If the consumer is closed, or if the
connection is broken.
javax.jms.JMSSecurityException - If the requester is not a READER on the
destination.
javax.jms.JMSException - If the request fails for any other reason.
public void close()
throws javax.jms.JMSException
close in interface javax.jms.MessageConsumerjavax.jms.JMSException
|
Joram ${version} | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||