类 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.- 从以下版本开始:
- 5.0
- 作者:
- Stephane Nicoll
构造器概要
构造器 构造器 说明 QosSettings()
Create a new instance with the default settings.QosSettings(int deliveryMode, int priority, long timeToLive)
Create a new instance with the specified settings.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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()
构造器详细资料
QosSettings
public QosSettings()
Create a new instance with the default settings.
QosSettings
public QosSettings(int deliveryMode, int priority, long timeToLive)
Create a new instance with the specified settings.
方法详细资料
setDeliveryMode
public void setDeliveryMode(int deliveryMode)
Set the delivery mode to use when sending a message. Default is the JMS Message default: "PERSISTENT".- 参数:
deliveryMode
- the delivery mode to use- 另请参阅:
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.
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.- 参数:
timeToLive
- the message's lifetime (in milliseconds)- 另请参阅:
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.