Package com.webmethods.jms
Interface WmMessageConsumer
- All Superinterfaces:
javax.jms.MessageConsumer
- All Known Subinterfaces:
WmQueueReceiver
,WmTopicSubscriber
public interface WmMessageConsumer
extends javax.jms.MessageConsumer
Interface defining webMethods extensions to javax.jms.MessageConsumer and its subclasses.
-
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the number of messages on the Broker available to the consumer.void
clear()
Clears all available messages to the consumer from the Broker.void
close()
javax.jms.Destination
Get theDestination
associated with this consumer.Returns an InputStream that reads data from a MessageConsumer.int
Get the maximum receive value for this message consumer.void
setMaxReceive
(int maxReceive) Set the maximum receive value for this message consumer.Methods inherited from interface javax.jms.MessageConsumer
getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener
-
Method Details
-
setMaxReceive
void setMaxReceive(int maxReceive) throws javax.jms.JMSException Set the maximum receive value for this message consumer. The message consumer will accumulate at most this number of messages at a time.- Parameters:
maxReceive
- the maximum number of messages to be accumulated by this message consumer- Throws:
javax.jms.JMSException
- if the JMS provider fails to set the maximum receive value.- See Also:
-
getMaxReceive
int getMaxReceive() throws javax.jms.JMSExceptionGet the maximum receive value for this message consumer. The message consumer will accumulate at most this number of messages at a time.- Returns:
- the maximum number of messages to be accumulated by this message consumer
- Throws:
javax.jms.JMSException
- if the JMS provider fails to get the maximum receive value.- See Also:
-
getDestination
javax.jms.Destination getDestination() throws javax.jms.JMSExceptionGet theDestination
associated with this consumer.- Returns:
- this consumer's
Destination
- Throws:
javax.jms.JMSException
- if the JMS provider fails to get the destination for this consumer due to some internal error.
-
available
long available() throws javax.jms.JMSExceptionGets the number of messages on the Broker available to the consumer. This is an approximate number in that some of the messages may be expired or don't match the consumer's message selector.- Returns:
- the number of messages available to the consumer
- Throws:
javax.jms.JMSException
- if the JMS provider fails to get the number of available messages.
-
clear
void clear() throws javax.jms.JMSExceptionClears all available messages to the consumer from the Broker.- Throws:
javax.jms.JMSException
- if the JMS provider fails to clear the consumer's messages.
-
getInputStream
Returns an InputStream that reads data from a MessageConsumer.- Returns:
- an InputStream
- Throws:
javax.jms.JMSException
- if the MessageConsumer's InputStream could not be returned.
-
close
void close() throws javax.jms.JMSException- Specified by:
close
in interfacejavax.jms.MessageConsumer
- Throws:
javax.jms.JMSException
-