Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.jms.extensions
Interface WLMessageProducer

All Superinterfaces:
  MessageProducer

    public interface WLMessageProducer

extends MessageProducer

A WLMessageProducer provides methods not supported by javax.jms.MessageProducer.

WLMessageProducer provide methods for the following:

- Setting and getting the time to deliver.
- Setting and getting the redelivery limit.
- Setting and getting the send timeout.
- Setting and getting the unit-of-order identifier.
- Message forwarding methods.
- Setting and getting the message compression threshold.

See Also:
  `MessageProducer`

Method Summary
`void` | `forward(Destination destination, Message message)` Forwards a message to a destination for an unidentified message producer.
`void` | `forward(Destination destination, Message message, int deliveryMode, int priority, long timeToLive)` Forwards a message to a destination for an unidentified message producer, specifying delivery mode, priority and time-to-live.
`void` | `forward(Message message)` Forwards a message using the MessageProducer's default delivery mode, priority, and time to live.
`void` | `forward(Message message, int deliveryMode, int priority, long timeToLive)` Forwards a message to a destination, specifying delivery mode, priority, and time-to-live.
`int` | `getCompressionThreshold()` The number of bytes for the serialized message body so any message that exceeds this limit will trigger message compression when the message is sent by the JMS message producer.
`int` | `getRedeliveryLimit()` Get the redelivery limit for the producer.
`long` | `getSendTimeout()` Get the send timeout for the producer.
`long` | `getTimeToDeliver()` Get the time-to-deliver for this producer.
`String` | `getUnitOfOrder()` Get the Unit-of-Order name associated with the producer.
`void` | `setCompressionThreshold(int limit)` The number of bytes for the serialized message body so any message that exceeds this limit will trigger message compression when the message is sent by the JMS message producer.
`void` | `setRedeliveryLimit(int redeliveryLimit)` Set the redelivery limit for the producer.
`void` | `setSendTimeout(long sendTimeout)` Set the send timeout for the producer.
`void` | `setTimeToDeliver(long timeToDeliver)` Set the time-to-deliver for this producer.
`void` | `setUnitOfOrder()` Set the Unit-of-Order for this producer with a system-generated name.
`void` | `setUnitOfOrder(String name)` Set the Unit-of-Order name 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 Detail

### getTimeToDeliver

    long getTimeToDeliver()
                          throws JMSException

  Get the time-to-deliver for this producer. This is a relative time representing the delay in milliseconds before a sent message is made visible on its target destination. The default time-to-deliver is 0; this default can be changed by modifying the configuration of the connection factory used to create this producer. If the time-to-deliver on the producer is set to -1 (the default), then this method will return the default time-to-deliver, which is the configurable value on the connection factory used to create this producer.

  Returns:
    The time to deliver for the message.
  Throws:
    `JMSException` - if a JMS error occurs.
  See Also:
    `WLMessageProducer.setTimeToDeliver(long)`, `WLMessage.getJMSDeliveryTime()`

### setTimeToDeliver

    void setTimeToDeliver(long timeToDeliver)
                          throws JMSException

  Set the time-to-deliver for this producer. This is a relative time representing the delay in milliseconds before a sent message is made visible on its target destination. The default time-to-deliver is 0; this default can be changed by modifying the configuration of the connection factory used to create this producer. Setting the time-to-deliver to -1 forces use of this default. Setting the time-to-deliver to anything greater than or equal to 0 overrides this default.

  Parameters:
    `timeToDeliver` - The time to deliver this message.
  Throws:
    `JMSException` - if a JMS error occurs.
  See Also:
    `WLMessageProducer.getTimeToDeliver()`, `WLMessage.getJMSDeliveryTime()`

### getRedeliveryLimit

    int getRedeliveryLimit()
                           throws JMSException

  Get the redelivery limit for the producer. This is the number of times a message will be redelivered after a recover or rollback. When this limit is reached, the message is moved to the error destination if one is configured; otherwise, the message is deleted. This limit may be overridden by a configured redelivery limit for the entire destination.

  Returns:
    The number of times to redeliver the message
  Throws:
    `JMSException` - if a JMS error occurs.
  See Also:
    `WLMessage.getJMSRedeliveryLimit()`, `WLMessage.setJMSRedeliveryLimit(int)`

### setRedeliveryLimit

    void setRedeliveryLimit(int redeliveryLimit)
                            throws JMSException

  Set the redelivery limit for the producer. This is the number of times a message will be redelivered after a recover or rollback. When this limit is reached, the message is moved to the error destination if one is configured, otherwise, the message is deleted. This limit may be overridden by a configured redelivery limit for the entire destination. A redelivery limit of -1 (the default) implies that there is no redelivery limit unless a limit is specified on the destination.

  Parameters:
    `redeliveryLimit` - the number of times to redeliver the message
  Throws:
    `JMSException` - if a JMS error occurs.
  See Also:
    `WLMessage.getJMSRedeliveryLimit()`, `WLMessage.setJMSRedeliveryLimit(int)`

### getSendTimeout

    long getSendTimeout()
                        throws JMSException

  Get the send timeout for the producer. This is the maximum time the producer will wait (in milliseconds) for space when sending a message. The default value is configurable on the connection factory used to create this producer.

  Returns:
    the send timeout in milliseconds
  Throws:
    `JMSException` - if a JMS error occurs.

### setSendTimeout

    void setSendTimeout(long sendTimeout)
                        throws JMSException

  Set the send timeout for the producer. This is the maximum time the producer will wait (in milliseconds) for space when sending a message. The default value is configurable on the connection factory used to create this producer.

  Parameters:
    `the` - send timeout in milliseconds
  Throws:
    `JMSException` - if a JMS error occurs.

### getUnitOfOrder

    String getUnitOfOrder()
                          throws JMSException

  Get the Unit-of-Order name associated with the producer.

  Returns:
    the unit of order name or null if none is associated with the producer.
  Throws:
    `JMSException` - if a JMS error occurs.

### setUnitOfOrder

    void setUnitOfOrder(String name)
                        throws JMSException

  Set the Unit-of-Order name for this producer. When name is null, there is no Unit-of-Order. Messages will be produced with this name attached. This makes sure that messages belonging to the same unit will be processed sequentially by consumers. A producer can have a default value which is configurable on the connection factory used to create this producer.

  Parameters:
    `the` - name or null if none is to be used.
  Throws:
    `JMSException` - if a JMS error occurs.
    `UnsupportedOperationException` - if the frontend is older than 9.0 (diablo)

### setUnitOfOrder

    void setUnitOfOrder()
                        throws JMSException

  Set the Unit-of-Order for this producer with a system-generated name. This method is used when the application does not require a specific name for the unit of order crated by this producer. The system creates a statistically unique name for the unit of order.

  Throws:
    `JMSException` - if a JMS error occurs.
    `UnsupportedOperationException` - if the frontend is older than 9.0 (diablo)

### forward

    void forward(Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
                 throws JMSException

  Forwards a message to a destination, specifying delivery mode, priority, and time-to-live. The timeToLive is relative to the JMSTimestamp on the message and the absolute time will be calculated on the JMS server. The forwarded message will have the same JMSMessageID, JMSTimestamp and JMSXUserID as the message before forwarding. The exact value of the remaining message attributes on the forwarded message will be the same as the `send` verb on the WLMessageProducer, as follows:

  `send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException;`

  Parameters:
    `message` - - the message to forward
    `deliveryMode` - - the delivery mode to use
    `priority` - - the priority for this message
    `timeToLive` - - the message's lifetime (in milliseconds)
  Throws:
    `JMSException` - - if the JMS provider fails to forward the message due to some internal error or the message is not forwardable.
    `MessageFormatException` - - if an invalid message is specified.
    `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.

### forward

    void forward(Message message)
                 throws JMSException

  Forwards a message using the MessageProducer's default delivery mode, priority, and time to live. The forwarded message will have the same JMSMessageID, JMSTimestamp and JMSXUserID as the message before forwarding. The exact value of the remaining message attributes on the forwarded message will be the same as the `send` verb on the WLMessageProducer, as follows:

  `send(Message message) throws JMSException;`

  Parameters:
    `message` - - the message to forward
  Throws:
    `JMSException` - - if the JMS provider fails to send the message due to some internal error or the message is not forwardable.
    `MessageFormatException` - - if an invalid message is specified.
    `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.

### forward

    void forward(Destination destination,
                 Message message,
                 int deliveryMode,
                 int priority,
                 long timeToLive)
                 throws JMSException

  Forwards a message to a destination for an unidentified message producer, specifying delivery mode, priority and time-to-live. The timeToLive is relative to the JMSTimestamp on the message and the absolute time will be calculated on the JMS server. The forwarded message will have the same JMSMessageID, JMSTimestamp and JMSXUserID as the message before forwarding. The exact value of the remaining message attributes on the forwarded message will be the same as the `send` verb on the WLMessageProducer, as follows:

  `send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException;`

  Parameters:
    `destination` - - the destination to forward this message to
    `message` - - the message to forward
    `deliveryMode` - - the delivery mode to use
    `priority` - - the priority for this message
    `timeToLive` - -the message's lifetime (in milliseconds)
  Throws:
    `JMSException` - - if the JMS provider fails to forward the message due to some internal error or the message is not forwardable.
    `MessageFormatException` - - if an invalid message is specified.
    `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 specify a destination at creation time.

### forward

    void forward(Destination destination,
                 Message message)
                 throws JMSException

  Forwards a message to a destination for an unidentified message producer. Uses the MessageProducer's default delivery mode, priority, and time-to-live. The forwarded message will have the same JMSMessageID, JMSTimestamp and JMSXUserID as the message before forwarding. The exact value of the remaining message attributes on the forwarded message will be the same as the `send` verb on the WLMessageProducer, as follows:

  `send(Destination destination, Message message) throws JMSException;`

  Parameters:
    `destination` - - the destination to forward this message to
    `message` - - the message to forward
  Throws:
    `JMSException` - - if the JMS provider fails to forward the message due to some internal error or the message is not forwardable.
    `MessageFormatException` - - if an invalid message is specified.
    `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 specify a destination at creation time.

### setCompressionThreshold

    void setCompressionThreshold(int limit)
                                 throws JMSException

  The number of bytes for the serialized message body so any message that exceeds this limit will trigger message compression when the message is sent by the JMS message producer.

  The compression occurs on the JMS message producer's JVM if the JMS message producer's JVM is not collocated with the JMS provider's JVM and if the message body size exceeds the threshold limit.

  The compression threshold value can be set to zero or higher. Setting it to zero will cause every message body to be compressed, except when messages are sent to a prior WebLogic Server release that doesn't support this feature.

  Parameters:
    `limit` - - minimum of the serialized message body size to trigger the compression.
  Throws:
    `JMSException`

### getCompressionThreshold

    int getCompressionThreshold()
                                throws JMSException

  The number of bytes for the serialized message body so any message that exceeds this limit will trigger message compression when the message is sent by the JMS message producer.

  The compression occurs on the JMS message producer's JVM if the JMS message producer's JVM is not collocated with the JMS provider's JVM and if the message body size exceeds the threshold limit.

  The compression threshold value can be set to zero or higher. Setting it to zero will cause every message body to be compressed, except when messages are sent to a prior WebLogic Server release that doesn't support this feature.

  Returns:
    The compression threshold for this message producer.
  Throws:
    `JMSException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs92 Copyright 2006 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD