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 Type
    Method
    Description
    int
    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 the MessageProducer'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
    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 the MessageProducer'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 a MessageProducer with an invalid destination.
      UnsupportedOperationException - if a client uses this method with a MessageProducer 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 send
      deliveryMode - the delivery mode to use
      priority - the priority for this message
      timeToLive - 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 a MessageProducer with an invalid destination.
      UnsupportedOperationException - if a client uses this method with a MessageProducer 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 the MessageProducer'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 to
      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 an invalid destination.
      UnsupportedOperationException - if a client uses this method with a MessageProducer 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 to
      messages - the messages to send
      deliveryMode - the delivery mode to use
      priority - the priority for this message
      timeToLive - 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 by java.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

      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 a MessageProducer with an invalid destination.
      UnsupportedOperationException - if a client uses this method with a MessageProducer that did not specify a destination at creation time.
      javax.jms.JMSException - if the MessageProducer's OutputStream could not be returned.
    • getOutputStream

      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 a MessageProducer with an invalid destination.
      UnsupportedOperationException - if a client uses this method with a MessageProducer that did not specify a destination at creation time.
      javax.jms.JMSException - if the MessageProducer's OutputStream could not be returned.