Package com.webmethods.jms
Interface WmMessageProducer
-
- All Superinterfaces:
javax.jms.MessageProducer
- All Known Subinterfaces:
WmQueueSender
,WmTopicPublisher
- All Known Implementing Classes:
WmClusterMultiSendProducerImpl
,WmClusterMultiSendQueueSenderImpl
,WmClusterMultiSendTopicPublisherImpl
,WmClusterQueueSenderImpl
,WmClusterTopicPublisherImpl
,WmMessageProducerImpl
,WmQueueSenderImpl
,WmTopicPublisherImpl
public interface WmMessageProducer extends javax.jms.MessageProducer
Interface defining webMethods extensions to javax.jms.MessageProducer and its subclasses.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getCompressionLevel()
Get the compression level for this producer.int
getCompressionThreshold()
Get the compression threshold for this producer.java.io.OutputStream
getOutputStream()
Returns an OutputStream that writes data over a MessageConsumer.java.io.OutputStream
getOutputStream(int packetSize)
Returns an OutputStream that writes data over a MessageConsumer.void
send(javax.jms.Destination destination, javax.jms.Message[] messages)
Sends multiple messages to a destination for an unidentified message producer.void
send(javax.jms.Destination destination, javax.jms.Message[] messages, int deliveryMode, int priority, long timeToLive)
Sends multiple messages to a destination for an unidentified message producer, specifying delivery mode, priority and time to live.void
send(javax.jms.Message[] messages)
Sends multiple messages using theMessageProducer
's default delivery mode, priority, and time to live.void
send(javax.jms.Message[] messages, int deliveryMode, int priority, long timeToLive)
Sends multiple messages to the destination, specifying delivery mode, priority, and time to live.void
setCompressionLevel(int level)
Set the compression level for this producer.void
setCompressionThreshold(int compressionThreshold)
Set the compression threshold for this producer.
-
-
-
Method Detail
-
send
void send(javax.jms.Message[] messages) throws javax.jms.JMSException
Sends multiple messages using theMessageProducer
's default delivery mode, priority, and time to live.- Parameters:
messages
- the messages to send- Throws:
javax.jms.JMSException
- if the JMS provider fails to send the message due to some internal error.javax.jms.MessageFormatException
- if an invalid message is specified.javax.jms.InvalidDestinationException
- if a client uses this method with aMessageProducer
with an invalid destination.java.lang.UnsupportedOperationException
- if a client uses this method with aMessageProducer
that did not specify a destination at creation time.- See Also:
Session.createProducer(javax.jms.Destination)
-
send
void send(javax.jms.Message[] messages, int deliveryMode, int priority, long timeToLive) throws javax.jms.JMSException
Sends multiple messages to the destination, specifying delivery mode, priority, and time to live.- Parameters:
messages
- the messages to senddeliveryMode
- the delivery mode to usepriority
- the priority for this messagetimeToLive
- the message's lifetime (in milliseconds)- Throws:
javax.jms.JMSException
- if the JMS provider fails to send the message due to some internal error.javax.jms.MessageFormatException
- if an invalid message is specified.javax.jms.InvalidDestinationException
- if a client uses this method with aMessageProducer
with an invalid destination.java.lang.UnsupportedOperationException
- if a client uses this method with aMessageProducer
that did not specify a destination at creation time.- See Also:
Session.createProducer(javax.jms.Destination)
-
send
void send(javax.jms.Destination destination, javax.jms.Message[] messages) throws javax.jms.JMSException
Sends multiple messages to a destination for an unidentified message producer. Uses theMessageProducer
's default delivery mode, priority, and time to live.Typically, a message producer is assigned a destination at creation time; however, the JMS API also supports unidentified message producers, which require that the destination be supplied every time a message is sent.
- Parameters:
destination
- the destination to send the messages tomessages
- the messages to send- Throws:
javax.jms.JMSException
- if the JMS provider fails to send the message due to some internal error.javax.jms.MessageFormatException
- if an invalid message is specified.javax.jms.InvalidDestinationException
- if a client uses this method with an invalid destination.java.lang.UnsupportedOperationException
- if a client uses this method with aMessageProducer
that specified a destination at creation time.- See Also:
Session.createProducer(javax.jms.Destination)
-
send
void send(javax.jms.Destination destination, javax.jms.Message[] messages, int deliveryMode, int priority, long timeToLive) throws javax.jms.JMSException
Sends multiple messages to a destination for an unidentified message producer, specifying delivery mode, priority and time to live.Typically, a message producer is assigned a destination at creation time; however, the JMS API also supports unidentified message producers, which require that the destination be supplied every time a message is sent.
- Parameters:
destination
- the destination to send the messages tomessages
- the messages to senddeliveryMode
- the delivery mode to usepriority
- the priority for this messagetimeToLive
- the message's lifetime (in milliseconds)- Throws:
javax.jms.JMSException
- if the JMS provider fails to send the message due to some internal error.javax.jms.MessageFormatException
- if an invalid message is specified.javax.jms.InvalidDestinationException
- if a client uses this method with an invalid destination.- See Also:
Session.createProducer(javax.jms.Destination)
-
setCompressionThreshold
void setCompressionThreshold(int compressionThreshold) throws javax.jms.JMSException
Set the compression threshold for this producer. Any message sent by this producer whose size exceeds the threshold will be automatically compressed.A value of -1 disables all message compression.
- Parameters:
compressionThreshold
- The compression threshold.- Throws:
javax.jms.JMSException
- for any internal errors.
-
getCompressionThreshold
int getCompressionThreshold() throws javax.jms.JMSException
Get the compression threshold for this producer.- Returns:
- The compression threshold.
- Throws:
javax.jms.JMSException
- for any internal errors.
-
setCompressionLevel
void setCompressionLevel(int level) throws javax.jms.JMSException
Set the compression level for this producer.- Parameters:
level
- The compression level (0-9) as defined byjava.util.zip.Deflater
.- Throws:
javax.jms.JMSException
- for any internal errors.
-
getCompressionLevel
int getCompressionLevel() throws javax.jms.JMSException
Get the compression level for this producer.- Returns:
- The compression level (0-9) as defined by
java.util.zip.Deflater
. - Throws:
javax.jms.JMSException
- for any internal errors.
-
getOutputStream
java.io.OutputStream getOutputStream(int packetSize) throws javax.jms.JMSException
Returns an OutputStream that writes data over a MessageConsumer.- Parameters:
packetSize
- the maximum number of bytes to include in each underlying BytesMessage that represents the stream.- Returns:
- an OutputStream
- Throws:
javax.jms.InvalidDestinationException
- if a client uses this method with aMessageProducer
with an invalid destination.java.lang.UnsupportedOperationException
- if a client uses this method with aMessageProducer
that did not specify a destination at creation time.javax.jms.JMSException
- if the MessageProducer's OutputStream could not be returned.
-
getOutputStream
java.io.OutputStream getOutputStream() throws javax.jms.JMSException
Returns an OutputStream that writes data over a MessageConsumer. The default packet size is used.- Returns:
- an OutputStream
- Throws:
javax.jms.InvalidDestinationException
- if a client uses this method with aMessageProducer
with an invalid destination.java.lang.UnsupportedOperationException
- if a client uses this method with aMessageProducer
that did not specify a destination at creation time.javax.jms.JMSException
- if the MessageProducer's OutputStream could not be returned.
-
-