Package com.webmethods.jms
Interface WmMessageConsumer
-
- All Superinterfaces:
javax.jms.MessageConsumer
- All Known Subinterfaces:
WmQueueReceiver
,WmTopicSubscriber
- All Known Implementing Classes:
WmClusterMessageConsumerImpl
,WmClusterQueueBrowserImpl
,WmClusterQueueReceiverImpl
,WmClusterSessionSubscriber
,WmClusterTopicSubscriberImpl
,WmClusterXAMessageConsumerImpl
,WmClusterXAQueueReceiverImpl
,WmClusterXATopicSubscriberImpl
,WmCompositeMessageConsumerImpl
,WmCompositeQueueReceiverImpl
,WmCompositeTopicSubscriberImpl
,WmMessageConsumerImpl
,WmQueueBrowserImpl
,WmQueueReceiverImpl
,WmSessionSubscriber
,WmTopicSubscriberImpl
public interface WmMessageConsumer extends javax.jms.MessageConsumer
Interface defining webMethods extensions to javax.jms.MessageConsumer and its subclasses.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
available()
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
getDestination()
Get theDestination
associated with this consumer.java.io.InputStream
getInputStream()
Returns an InputStream that reads data from a MessageConsumer.int
getMaxReceive()
Get the maximum receive value for this message consumer.void
setMaxReceive(int maxReceive)
Set the maximum receive value for this message consumer.
-
-
-
Method Detail
-
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()
-
getMaxReceive
int getMaxReceive() throws javax.jms.JMSException
Get 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:
setMaxReceive(int)
-
getDestination
javax.jms.Destination getDestination() throws javax.jms.JMSException
Get 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.JMSException
Gets 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.JMSException
Clears 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
java.io.InputStream getInputStream() throws javax.jms.JMSException
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
-
-