public class AMPManager
extends java.lang.Object
| Constructor and Description |
|---|
AMPManager() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isActionSupported(org.jivesoftware.smack.XMPPConnection connection,
AMPExtension.Action action)
Check if server supports specified action
|
static boolean |
isConditionSupported(org.jivesoftware.smack.XMPPConnection connection,
java.lang.String conditionName)
Check if server supports specified condition
|
static boolean |
isServiceEnabled(org.jivesoftware.smack.XMPPConnection connection)
Returns true if the AMP support is enabled for the given connection.
|
static void |
setServiceEnabled(org.jivesoftware.smack.XMPPConnection connection,
boolean enabled)
Enables or disables the AMP support on a given connection.
|
public static void setServiceEnabled(org.jivesoftware.smack.XMPPConnection connection,
boolean enabled)
Before starting to send AMP messages to a user, check that the user can handle XHTML messages. Enable the AMP support to indicate that this client handles XHTML messages.
connection - the connection where the service will be enabled or disabledenabled - indicates if the service will be enabled or disabledpublic static boolean isServiceEnabled(org.jivesoftware.smack.XMPPConnection connection)
connection - the connection to look for AMP supportpublic static boolean isActionSupported(org.jivesoftware.smack.XMPPConnection connection,
AMPExtension.Action action)
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException
connection - active xmpp connectionaction - action to checkorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionpublic static boolean isConditionSupported(org.jivesoftware.smack.XMPPConnection connection,
java.lang.String conditionName)
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException
connection - active xmpp connectionconditionName - name of condition to checkorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionAMPDeliverCondition,
AMPExpireAtCondition,
AMPMatchResourceCondition