Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » QAnywhere » QAnywhere 参考 » QAnywhere Java API 参考 » 用于客户端的 QAnywhere Java API » QAMessage 接口

 

getExpiration 方法

语法
java.util.Date QAMessage.getExpiration()
throws QAException
抛出条件
  • 如果获取有效期时存在问题,则抛出。

注释

返回消息的有效期值,或在消息没有到期或尚未发送的情况下返回空值。

发送消息时,有效期保持未指派状态。发送操作完成后,它用于保存消息的到期时间。

它是一个只读属性,因为消息的到期时间是通过将 QAManagerBase.putMessageTimeToLive(String, QAMessage, long) 的生存期参数值与当前时间相加而设置的。

另请参见

putMessageTimeToLive 方法

返回值

消息的有效期值,或在消息没有到期或尚未发送的情况下返回空值。