Class AMPExpireAtCondition

java.lang.Object
org.jivesoftware.smackx.amp.AMPExpireAtCondition
All Implemented Interfaces:
AMPExtension.Condition

public class AMPExpireAtCondition extends Object implements AMPExtension.Condition
  • Field Details

  • Constructor Details

    • AMPExpireAtCondition

      public AMPExpireAtCondition(Date utcDateTime)
      Create new expire-at amp condition with value set as XEP-0082 formatted date.
      Parameters:
      utcDateTime - Date instance of time that will be used as value parameter after formatting to XEP-0082 format. Can't be null.
    • AMPExpireAtCondition

      public AMPExpireAtCondition(String utcDateTime)
      Create new expire-at amp condition with defined value.
      Parameters:
      utcDateTime - UTC time string that will be used as value parameter. Should be formatted as XEP-0082 Date format. Can't be null.
  • Method Details

    • isSupported

      public static boolean isSupported(org.jivesoftware.smack.XMPPConnection connection) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Check if server supports expire-at condition.
      Parameters:
      connection - Smack connection instance
      Returns:
      true if expire-at condition is supported.
      Throws:
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • getName

      public String getName()
      Specified by:
      getName in interface AMPExtension.Condition
    • getValue

      public String getValue()
      Specified by:
      getValue in interface AMPExtension.Condition