|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for receiving messages from a MessageConsumer
or
QueueBrowser
.
Method Summary | |
void |
close()
Close the underlying MessageConsumer or QueueBrowser |
javax.jms.Destination |
getDestination()
Return the destination associated with the MessageConsumer |
java.lang.String |
getName()
Returns the name of the subscriber, if the consumer is a durable topic subscriber |
boolean |
getNoLocal()
Returns the no-local value, if the consumer is a topic subscriber |
java.lang.String |
getSelector()
Returns the message selector associated with the MessageConsumer |
java.util.List |
receive(int count,
long timeout)
Return a list of Message instances from a
MessageConsumer or QueueBrowser |
void |
receive(long timeout,
CountingListener listener)
Receive messages, delegating received messages to a CountingListener |
void |
remove()
Close the underlying MessageConsumer or QueueBrowser. |
Method Detail |
public java.util.List receive(int count, long timeout) throws javax.jms.JMSException
Message
instances from a
MessageConsumer or QueueBrowsercount
- the number of messages expected. This is indicative only;
implementations may return less (if messages aren't available) or more
(if an asynchronous implementation is used) messages than the specified
value.timeout
- the maximum time to wait for each message. If set to 0,
then it waits until a message becomes available.javax.jms.JMSException
- if the operation failspublic void receive(long timeout, CountingListener listener) throws javax.jms.JMSException
CountingListener
timeout
- the maximum time to wait for each message. If set to 0,
then it waits until a message becomes available.listener
- the listener to delegate messages tojavax.jms.JMSException
- if the operation failspublic javax.jms.Destination getDestination() throws javax.jms.JMSException
javax.jms.JMSException
- if the operation failspublic java.lang.String getSelector() throws javax.jms.JMSException
javax.jms.JMSException
- if the operation failspublic java.lang.String getName()
null
if the
consumer is not a durable topic subscriberpublic boolean getNoLocal() throws javax.jms.JMSException
false
javax.jms.JMSException
- if the operation failspublic void close() throws javax.jms.JMSException
javax.jms.JMSException
- if the operation failspublic void remove() throws javax.jms.JMSException
javax.jms.JMSException
- if the operation fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |