public final class FallbackIndicationManager
extends org.jivesoftware.smack.Manager
| Modifier and Type | Method and Description |
|---|---|
static org.jivesoftware.smack.packet.MessageBuilder |
addFallbackIndication(org.jivesoftware.smack.packet.MessageBuilder messageBuilder)
Add a
FallbackIndicationElement to the provided message builder. |
void |
addFallbackIndicationListener(FallbackIndicationListener listener)
Register a
FallbackIndicationListener that gets notified whenever a message that contains a
FallbackIndicationElement is received. |
static org.jivesoftware.smack.packet.MessageBuilder |
addFallbackIndicationWithBody(org.jivesoftware.smack.packet.MessageBuilder messageBuilder,
java.lang.String fallbackMessageBody)
Set the body of the message to the provided fallback message and add a
FallbackIndicationElement. |
static FallbackIndicationManager |
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection) |
void |
removeFallbackIndicationListener(FallbackIndicationListener listener)
Unregister a
FallbackIndicationListener. |
boolean |
serverSupportsFallbackIndications()
Determine, whether or not the server supports Fallback Indications.
|
boolean |
userSupportsFallbackIndications(org.jxmpp.jid.EntityBareJid jid)
Determine, whether or not a user supports Fallback Indications.
|
public static FallbackIndicationManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
public boolean userSupportsFallbackIndications(org.jxmpp.jid.EntityBareJid jid)
throws org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException,
org.jivesoftware.smack.SmackException.NoResponseException
jid - BareJid of the user.XMPPException.XMPPErrorException - if a protocol level error happensSmackException.NotConnectedException - if the connection is not connectedjava.lang.InterruptedException - if the thread is being interruptedSmackException.NoResponseException - if the server doesn't send a response in timepublic boolean serverSupportsFallbackIndications()
throws org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException,
java.lang.InterruptedException,
org.jivesoftware.smack.SmackException.NoResponseException
XMPPException.XMPPErrorException - if a protocol level error happensSmackException.NotConnectedException - if the connection is not connectedjava.lang.InterruptedException - if the thread is being interruptedSmackException.NoResponseException - if the server doesn't send a response in timepublic static org.jivesoftware.smack.packet.MessageBuilder addFallbackIndicationWithBody(org.jivesoftware.smack.packet.MessageBuilder messageBuilder,
java.lang.String fallbackMessageBody)
FallbackIndicationElement.messageBuilder - message builderfallbackMessageBody - fallback message bodypublic static org.jivesoftware.smack.packet.MessageBuilder addFallbackIndication(org.jivesoftware.smack.packet.MessageBuilder messageBuilder)
FallbackIndicationElement to the provided message builder.messageBuilder - message builderpublic void addFallbackIndicationListener(FallbackIndicationListener listener)
FallbackIndicationListener that gets notified whenever a message that contains a
FallbackIndicationElement is received.listener - listener to be registered.public void removeFallbackIndicationListener(FallbackIndicationListener listener)
FallbackIndicationListener.listener - listener to be unregistered.