public final class MessageFasteningManager
extends org.jivesoftware.smack.Manager
setEnabledByDefault(boolean) (default true).
To fasten a payload to a previous message, create an FasteningElement using the builder provided by
FasteningElement.builder().
You need to provide the OriginIdElement of the message you want to reference.
Then add wrapped payloads using FasteningElement.Builder#addWrappedPayloads(List)
and external payloads using FasteningElement.Builder#addExternalPayloads(List).
If you fastened some payloads onto the message previously and now want to replace the previous fastening, call
FasteningElement.Builder#isRemovingElement().
Once you are finished, build the FasteningElement using FasteningElement.Builder#build() and add it to
a stanza by calling FasteningElement.applyTo(MessageBuilder).| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAMESPACE |
| Modifier and Type | Method and Description |
|---|---|
void |
announceSupport()
Announce support for Message Fastening via Service Discovery.
|
static MessageFasteningManager |
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection) |
static void |
setEnabledByDefault(boolean enabled)
Enable or disable auto-announcing support for Message Fastening.
|
void |
stopAnnouncingSupport()
Stop announcing support for Message Fastening.
|
public static final java.lang.String NAMESPACE
public static MessageFasteningManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
public static void setEnabledByDefault(boolean enabled)
enabled - enabledpublic void announceSupport()
public void stopAnnouncingSupport()