Package com.webmethods.jms
Interface WmMessageProducer
- All Superinterfaces:
javax.jms.MessageProducer
- All Known Subinterfaces:
WmQueueSender
,WmTopicPublisher
public interface WmMessageProducer
extends javax.jms.MessageProducer
Interface defining webMethods extensions to javax.jms.MessageProducer and its subclasses.
-
Method Summary
Modifier and TypeMethodDescriptionint
Get the compression level for this producer.int
Get the compression threshold for this producer.Returns an OutputStream that writes data over a MessageConsumer.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.Methods inherited from interface javax.jms.MessageProducer
close, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLive
-
Method Details
-
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.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.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.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.JMSExceptionGet 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.JMSExceptionGet 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
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.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
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.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.
-