public class AMPExpireAtCondition extends Object implements AMPExtension.Condition
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
ATTRIBUTE_NAME
Constructor and Description |
---|
AMPExpireAtCondition(Date utcDateTime)
Create new expire-at amp condition with value setted as XEP-0082 formatted date.
|
AMPExpireAtCondition(String utcDateTime)
Create new expire-at amp condition with defined value.
|
Modifier and Type | Method and Description |
---|---|
String |
getName() |
String |
getValue() |
static boolean |
isSupported(XMPPConnection connection)
Check if server supports expire-at condition
|
public static final String NAME
public AMPExpireAtCondition(Date utcDateTime)
utcDateTime
- Date instance of time
that will be used as value parameter after formatting to XEP-0082 format. Can't be null.public AMPExpireAtCondition(String utcDateTime)
utcDateTime
- UTC time string that will be used as value parameter.
Should be formatted as XEP-0082 Date format. Can't be null.public static boolean isSupported(XMPPConnection connection) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException
connection
- Smack connection instanceXMPPException.XMPPErrorException
SmackException.NoResponseException
SmackException.NotConnectedException
public String getName()
getName
in interface AMPExtension.Condition
public String getValue()
getValue
in interface AMPExtension.Condition