public class Forwarded extends Object implements ExtensionElement
| Modifier and Type | Field and Description |
|---|---|
static String |
ELEMENT |
static String |
NAMESPACE |
| Constructor and Description |
|---|
Forwarded(DelayInformation delay,
Stanza fwdPacket)
Creates a new Forwarded stanza(/packet) extension.
|
Forwarded(Stanza fwdPacket)
Creates a new Forwarded stanza(/packet) extension.
|
| Modifier and Type | Method and Description |
|---|---|
static Forwarded |
from(Stanza packet) |
DelayInformation |
getDelayInformation()
get the timestamp of the forwarded packet.
|
String |
getElementName()
Returns the root element name.
|
Stanza |
getForwardedPacket()
get the stanza(/packet) forwarded by this stanza.
|
String |
getNamespace()
Returns the root element XML namespace.
|
XmlStringBuilder |
toXML()
Returns the XML representation of this Element.
|
public static final String NAMESPACE
public static final String ELEMENT
public Forwarded(DelayInformation delay, Stanza fwdPacket)
delay - an optional DelayInformation timestamp of the packet.fwdPacket - the stanza(/packet) that is forwarded (required).public String getElementName()
NamedElementgetElementName in interface NamedElementpublic String getNamespace()
ExtensionElementgetNamespace in interface ExtensionElementpublic XmlStringBuilder toXML()
Elementpublic Stanza getForwardedPacket()
Stanza instance (typically a message) that was forwarded.public DelayInformation getDelayInformation()
DelayInformation representing the time when the original stanza(/packet) was sent. May be null.