org.springframework.jms.support

## Class QosSettings

- java.lang.Object
- - org.springframework.jms.support.QosSettings

    public class QosSettings
    extends Object

Gather the Quality-of-Service settings that can be used when sending a message.

Since:
  5.0
Author:
  Stephane Nicoll

### Constructor Summary

Constructors
Constructor and Description
`QosSettings()` Create a new instance with the default settings.
`QosSettings(int deliveryMode, int priority, long timeToLive)` Create a new instance with the specified settings.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object other)`
`int` `getDeliveryMode()` Return the delivery mode to use when sending a message.
`int` `getPriority()` Return the priority of a message when sending.
`long` `getTimeToLive()` Return the time-to-live of the message when sending.
`int` `hashCode()`
`void` `setDeliveryMode(int deliveryMode)` Set the delivery mode to use when sending a message.
`void` `setPriority(int priority)` Set the priority of a message when sending.
`void` `setTimeToLive(long timeToLive)` Set the time-to-live of the message when sending.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### QosSettings

    public QosSettings()

Create a new instance with the default settings.

See Also:
  `Message.DEFAULT_DELIVERY_MODE`, `Message.DEFAULT_PRIORITY`, `Message.DEFAULT_TIME_TO_LIVE`

#### QosSettings

    public QosSettings(int deliveryMode,
                       int priority,
                       long timeToLive)

Create a new instance with the specified settings.

### Method Detail

#### setDeliveryMode

    public void setDeliveryMode(int deliveryMode)

Set the delivery mode to use when sending a message. Default is the JMS Message default: "PERSISTENT".

Parameters:
  `deliveryMode` - the delivery mode to use
See Also:
  `DeliveryMode.PERSISTENT`, `DeliveryMode.NON_PERSISTENT`, `Message.DEFAULT_DELIVERY_MODE`, `MessageProducer.send(javax.jms.Message, int, int, long)`

#### getDeliveryMode

    public int getDeliveryMode()

Return the delivery mode to use when sending a message.

#### setPriority

    public void setPriority(int priority)

Set the priority of a message when sending.

See Also:
  `Message.DEFAULT_PRIORITY`, `MessageProducer.send(javax.jms.Message, int, int, long)`

#### getPriority

    public int getPriority()

Return the priority of a message when sending.

#### setTimeToLive

    public void setTimeToLive(long timeToLive)

Set the time-to-live of the message when sending.

Parameters:
  `timeToLive` - the message's lifetime (in milliseconds)
See Also:
  `Message.DEFAULT_TIME_TO_LIVE`, `MessageProducer.send(javax.jms.Message, int, int, long)`

#### getTimeToLive

    public long getTimeToLive()

Return the time-to-live of the message when sending.

#### equals

    public boolean equals(@Nullable
                          Object other)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`