public class Forwarded
extends java.lang.Object
implements org.jivesoftware.smack.packet.ExtensionElement
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
| Constructor and Description |
|---|
Forwarded(DelayInformation delay,
org.jivesoftware.smack.packet.Stanza fwdPacket)
Creates a new Forwarded stanza extension.
|
Forwarded(org.jivesoftware.smack.packet.Stanza fwdPacket)
Creates a new Forwarded stanza extension.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<org.jivesoftware.smack.packet.Message> |
extractMessagesFrom(java.util.Collection<Forwarded> forwardedCollection)
Extract messages in a collection of forwarded elements.
|
static Forwarded |
from(org.jivesoftware.smack.packet.Stanza packet)
Get the forwarded extension.
|
DelayInformation |
getDelayInformation()
get the timestamp of the forwarded packet.
|
java.lang.String |
getElementName() |
org.jivesoftware.smack.packet.Stanza |
getForwardedPacket()
Deprecated.
use @{link
getForwardedStanza()} instead. |
org.jivesoftware.smack.packet.Stanza |
getForwardedStanza()
Get the forwarded Stanza found in this extension.
|
java.lang.String |
getNamespace() |
org.jivesoftware.smack.util.XmlStringBuilder |
toXML(java.lang.String enclosingNamespace) |
public static final java.lang.String NAMESPACE
public static final java.lang.String ELEMENT
public Forwarded(DelayInformation delay, org.jivesoftware.smack.packet.Stanza fwdPacket)
delay - an optional DelayInformation timestamp of the packet.fwdPacket - the stanza that is forwarded (required).public Forwarded(org.jivesoftware.smack.packet.Stanza fwdPacket)
fwdPacket - the stanza that is forwarded (required).public java.lang.String getElementName()
getElementName in interface org.jivesoftware.smack.packet.NamedElementpublic java.lang.String getNamespace()
getNamespace in interface org.jivesoftware.smack.packet.ExtensionElementpublic org.jivesoftware.smack.util.XmlStringBuilder toXML(java.lang.String enclosingNamespace)
toXML in interface org.jivesoftware.smack.packet.Element@Deprecated public org.jivesoftware.smack.packet.Stanza getForwardedPacket()
getForwardedStanza()} instead.Stanza instance (typically a message) that was forwarded.public org.jivesoftware.smack.packet.Stanza getForwardedStanza()
Stanza (typically a message) that was forwarded.public DelayInformation getDelayInformation()
DelayInformation representing the time when the original stanza was sent. May be null.public static Forwarded from(org.jivesoftware.smack.packet.Stanza packet)
packet - public static java.util.List<org.jivesoftware.smack.packet.Message> extractMessagesFrom(java.util.Collection<Forwarded> forwardedCollection)
Forwarded in
the given collection only contain Message stanzas.forwardedCollection - the collection to extract from.