Package org.jivesoftware.smackx.amp
Class AMPDeliverCondition
- java.lang.Object
-
- org.jivesoftware.smackx.amp.AMPDeliverCondition
-
- All Implemented Interfaces:
AMPExtension.Condition
public class AMPDeliverCondition extends Object implements AMPExtension.Condition
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AMPDeliverCondition.Value
Value for amp deliver condition as defined by XEP-0079.
-
Field Summary
Fields Modifier and Type Field Description static String
NAME
-
Fields inherited from interface org.jivesoftware.smackx.amp.packet.AMPExtension.Condition
ATTRIBUTE_NAME
-
-
Constructor Summary
Constructors Constructor Description AMPDeliverCondition(AMPDeliverCondition.Value value)
Create new amp deliver condition with value set to one of defined by XEP-0079.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
String
getValue()
static boolean
isSupported(XMPPConnection connection)
Check if server supports deliver condition.
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AMPDeliverCondition
public AMPDeliverCondition(AMPDeliverCondition.Value value)
Create new amp deliver condition with value set to one of defined by XEP-0079. See http://xmpp.org/extensions/xep-0079.html#conditions-def-deliver- Parameters:
value
- AMPDeliveryCondition.Value instance that will be used as value parameter. Can't be null.
-
-
Method Detail
-
isSupported
public static boolean isSupported(XMPPConnection connection) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
Check if server supports deliver condition.- Parameters:
connection
- Smack connection instance- Returns:
- true if deliver 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.InterruptedException
- if the calling thread was interrupted.
-
getName
public String getName()
- Specified by:
getName
in interfaceAMPExtension.Condition
-
getValue
public String getValue()
- Specified by:
getValue
in interfaceAMPExtension.Condition
-
-