Package rocks.xmpp.extensions.forward
Class StanzaForwardingManager
- java.lang.Object
-
- rocks.xmpp.core.session.Manager
-
- rocks.xmpp.extensions.forward.StanzaForwardingManager
-
- All Implemented Interfaces:
ExtensionProtocol,DiscoverableInfo
public final class StanzaForwardingManager extends Manager implements ExtensionProtocol, DiscoverableInfo
This manager allows forwarding stanzas to other XMPP entities.Enabling this manager simply indicates support for the stanza forwarding extension in a service discovery response and has no further effect.
By default, stanza forwarding support is not enabled.
In order to check for a forwarded stanza, simply check for the
Forwardedextension:Forwarded forwarded = message.getExtension(Forwarded.class); if (forwarded != null) { Message forwardedMessage = forwarded.getMessage(); }
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforwardMessage(Message message, Jid to)Forwards a message to another XMPP entity.Set<String>getFeatures()Gets the features.StringgetNamespace()The protocol's main namespace.-
Methods inherited from class rocks.xmpp.core.session.Manager
isEnabled, setEnabled
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface rocks.xmpp.extensions.disco.model.info.DiscoverableInfo
getExtensions, getIdentities
-
Methods inherited from interface rocks.xmpp.core.ExtensionProtocol
isEnabled
-
-
-
-
Method Detail
-
forwardMessage
public void forwardMessage(Message message, Jid to)
Forwards a message to another XMPP entity.- Parameters:
message- The original message.to- The receiver.
-
getNamespace
public final String getNamespace()
Description copied from interface:ExtensionProtocolThe protocol's main namespace. This is used to uniquely identify the extension protocol.- Specified by:
getNamespacein interfaceExtensionProtocol- Returns:
- The main namespace.
-
getFeatures
public final Set<String> getFeatures()
Description copied from interface:DiscoverableInfoGets the features.- Specified by:
getFeaturesin interfaceDiscoverableInfo- Returns:
- The features.
-
-