Package org.jivesoftware.smackx.amp
Class AMPExpireAtCondition
- java.lang.Object
-
- org.jivesoftware.smackx.amp.AMPExpireAtCondition
-
- All Implemented Interfaces:
AMPExtension.Condition
public class AMPExpireAtCondition extends java.lang.Object implements AMPExtension.Condition
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
-
Fields inherited from interface org.jivesoftware.smackx.amp.packet.AMPExtension.Condition
ATTRIBUTE_NAME
-
-
Constructor Summary
Constructors Constructor Description AMPExpireAtCondition(java.lang.String utcDateTime)
Create new expire-at amp condition with defined value.AMPExpireAtCondition(java.util.Date utcDateTime)
Create new expire-at amp condition with value set as XEP-0082 formatted date.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
java.lang.String
getValue()
static boolean
isSupported(XMPPConnection connection)
Check if server supports expire-at condition.
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AMPExpireAtCondition
public AMPExpireAtCondition(java.util.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(java.lang.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 Detail
-
isSupported
public static boolean isSupported(XMPPConnection connection) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
Check if server supports expire-at condition.- Parameters:
connection
- Smack connection instance- Returns:
- true if expire-at condition is supported.
- Throws:
XMPPException.XMPPErrorException
- if there was an XMPP error returned.SmackException.NoResponseException
- if there was no response from the remote entity.SmackException.NotConnectedException
- if the XMPP connection is not connected.java.lang.InterruptedException
- if the calling thread was interrupted.
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceAMPExtension.Condition
-
getValue
public java.lang.String getValue()
- Specified by:
getValue
in interfaceAMPExtension.Condition
-
-