public class XHTMLManager
extends java.lang.Object
| Constructor and Description |
|---|
XHTMLManager() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addBody(org.jivesoftware.smack.packet.MessageBuilder messageBuilder,
XHTMLText xhtmlText)
Adds an XHTML body to the message.
|
static void |
addBody(org.jivesoftware.smack.packet.Message message,
XHTMLText xhtmlText)
Deprecated.
use
addBody(MessageBuilder, XHTMLText) instead. |
static java.util.List<java.lang.CharSequence> |
getBodies(org.jivesoftware.smack.packet.MessageView message)
Returns an Iterator for the XHTML bodies in the message.
|
static boolean |
isServiceEnabled(org.jivesoftware.smack.XMPPConnection connection)
Returns true if the XHTML support is enabled for the given connection.
|
static boolean |
isServiceEnabled(org.jivesoftware.smack.XMPPConnection connection,
org.jxmpp.jid.Jid userID)
Returns true if the specified user handles XHTML messages.
|
static boolean |
isXHTMLMessage(org.jivesoftware.smack.packet.Message message)
Returns true if the message contains an XHTML extension.
|
static void |
setServiceEnabled(org.jivesoftware.smack.XMPPConnection connection,
boolean enabled)
Enables or disables the XHTML support on a given connection.
|
public static java.util.List<java.lang.CharSequence> getBodies(org.jivesoftware.smack.packet.MessageView message)
message - an XHTML messagepublic static void addBody(org.jivesoftware.smack.packet.MessageBuilder messageBuilder,
XHTMLText xhtmlText)
messageBuilder - the message that will receive the XHTML bodyxhtmlText - the string to add as an XHTML body to the message@Deprecated
public static void addBody(org.jivesoftware.smack.packet.Message message,
XHTMLText xhtmlText)
addBody(MessageBuilder, XHTMLText) instead.message - the message that will receive the XHTML bodyxhtmlText - the string to add as an XHTML body to the messagepublic static boolean isXHTMLMessage(org.jivesoftware.smack.packet.Message message)
message - the message to check if contains an XHTML extension or notpublic static void setServiceEnabled(org.jivesoftware.smack.XMPPConnection connection,
boolean enabled)
Before starting to send XHTML messages to a user, check that the user can handle XHTML messages. Enable the XHTML 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 XHTML supportpublic static boolean isServiceEnabled(org.jivesoftware.smack.XMPPConnection connection,
org.jxmpp.jid.Jid userID)
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException
connection - the connection to use to perform the service discoveryuserID - the user to check. A fully qualified xmpp ID, e.g. jdoe@example.comorg.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.