webMethods Broker API for JMS
Version 9.5.1.0.171 091713

com.webmethods.jms
Interface WmMessageConsumer

All Superinterfaces:
javax.jms.MessageConsumer

public interface WmMessageConsumer
extends javax.jms.MessageConsumer

Interface defining webMethods extensions to javax.jms.MessageConsumer and its subclasses.


Method Summary
 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 the Destination 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.
 
Methods inherited from interface javax.jms.MessageConsumer
getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener
 

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 the Destination 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 interface javax.jms.MessageConsumer
Throws:
javax.jms.JMSException

webMethods Broker API for JMS
Version 9.5.1.0.171 091713


Copyright © 2001 - 2013 Software AG Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, United States of America, and/or their suppliers.