|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.jms.connection.MessageConsumerImpl
public class MessageConsumerImpl
A basic message consumer.
| Field Summary | |
|---|---|
protected Selector |
_selector
|
protected JmsSession |
_session
|
| Method Summary | |
|---|---|
void |
close()
Closes the consumer. |
protected AbstractDestination |
getDestination()
Returns the destination |
MessageListener |
getMessageListener()
Returns the message listener |
java.lang.String |
getMessageSelector()
Returns the message consumer's selector. |
boolean |
getNoLocal()
Returns true if local messages are not sent. |
Selector |
getSelector()
Returns the parsed selector. |
boolean |
isActive()
Returns true if active |
boolean |
isClosed()
Returns true if closed |
boolean |
notifyMessageAvailable()
Notifies that a message is available. |
Message |
receive()
Receives the next message, blocking until a message is available. |
Message |
receive(long timeout)
Receives a message from the queue. |
Message |
receiveNoWait()
Receives a message from the queue. |
void |
setMessageListener(MessageListener listener)
Sets the message listener |
void |
setMessageListener(MessageListener listener,
long pollInterval)
Sets the message listener with a poll interval |
void |
stop()
Stops the consumer. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final JmsSession _session
protected Selector _selector
| Method Detail |
|---|
protected AbstractDestination getDestination()
throws JMSException
JMSException
public boolean getNoLocal()
throws JMSException
JMSException
public MessageListener getMessageListener()
throws JMSException
getMessageListener in interface MessageConsumerJMSException
public void setMessageListener(MessageListener listener)
throws JMSException
setMessageListener in interface MessageConsumerJMSException
public void setMessageListener(MessageListener listener,
long pollInterval)
throws JMSException
JMSException
public java.lang.String getMessageSelector()
throws JMSException
getMessageSelector in interface MessageConsumerJMSExceptionpublic Selector getSelector()
public boolean isActive()
throws JMSException
JMSExceptionpublic boolean isClosed()
public Message receive()
throws JMSException
receive in interface MessageConsumerJMSException
public Message receiveNoWait()
throws JMSException
receiveNoWait in interface MessageConsumerJMSException
public Message receive(long timeout)
throws JMSException
receive in interface MessageConsumerJMSExceptionpublic boolean notifyMessageAvailable()
notifyMessageAvailable in interface MessageAvailableListener
public void stop()
throws JMSException
JMSException
public void close()
throws JMSException
close in interface MessageConsumerJMSExceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||