Class MessageFasteningManager
- java.lang.Object
-
- org.jivesoftware.smack.Manager
-
- org.jivesoftware.smackx.message_fastening.MessageFasteningManager
-
public final class MessageFasteningManager extends Manager
Smacks API for XEP-0422: Message Fastening. The API is still very bare bones, as the XEP intends Message Fastening to be used as a tool by other protocols. To enable / disable auto-announcing support for this feature, callsetEnabledByDefault(boolean)(default true). To fasten a payload to a previous message, create anFasteningElementusing the builder provided byFasteningElement.builder(). You need to provide theOriginIdElementof the message you want to reference. Then add wrapped payloads usingFasteningElement.Builder.addWrappedPayloads(List)and external payloads usingFasteningElement.Builder.addExternalPayloads(List). If you fastened some payloads onto the message previously and now want to replace the previous fastening, callFasteningElement.isRemovingElement(). Once you are finished, build theFasteningElementusingFasteningElement.Builder.build()and add it to a stanza by callingFasteningElement.applyTo(MessageBuilder).- See Also:
- XEP-0422: Message Fastening
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMESPACE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidannounceSupport()Announce support for Message Fastening via Service Discovery.static MessageFasteningManagergetInstanceFor(XMPPConnection connection)static voidsetEnabledByDefault(boolean enabled)Enable or disable auto-announcing support for Message Fastening.voidstopAnnouncingSupport()Stop announcing support for Message Fastening.-
Methods inherited from class org.jivesoftware.smack.Manager
connection, getAuthenticatedConnectionOrThrow, schedule, schedule, scheduleBlocking
-
-
-
-
Field Detail
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstanceFor
public static MessageFasteningManager getInstanceFor(XMPPConnection connection)
-
setEnabledByDefault
public static void setEnabledByDefault(boolean enabled)
Enable or disable auto-announcing support for Message Fastening. Default is enabled.- Parameters:
enabled- enabled
-
announceSupport
public void announceSupport()
Announce support for Message Fastening via Service Discovery.
-
stopAnnouncingSupport
public void stopAnnouncingSupport()
Stop announcing support for Message Fastening.
-
-