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, java.lang.InterruptedException
connection
- active xmpp connectionaction
- action to checkorg.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.java.lang.InterruptedException
- if the calling thread was interrupted.public 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, java.lang.InterruptedException
connection
- active xmpp connectionconditionName
- name of condition to checkorg.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.java.lang.InterruptedException
- if the calling thread was interrupted.AMPDeliverCondition
,
AMPExpireAtCondition
,
AMPMatchResourceCondition