public class Forwarded extends java.lang.Object implements ExtensionElement
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT |
static java.lang.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)
Get the forwarded extension.
|
DelayInformation |
getDelayInformation()
get the timestamp of the forwarded packet.
|
java.lang.String |
getElementName()
Returns the root element name.
|
Stanza |
getForwardedPacket()
Deprecated.
use @{link
getForwardedStanza() } instead. |
Stanza |
getForwardedStanza()
Get the forwarded Stanza found in this extension.
|
java.lang.String |
getNamespace()
Returns the root element XML namespace.
|
XmlStringBuilder |
toXML()
Returns the XML representation of this Element.
|
public static final java.lang.String NAMESPACE
public static final java.lang.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 java.lang.String getElementName()
NamedElement
getElementName
in interface NamedElement
public java.lang.String getNamespace()
ExtensionElement
getNamespace
in interface ExtensionElement
public XmlStringBuilder toXML()
Element
@Deprecated public Stanza getForwardedPacket()
getForwardedStanza()
} instead.Stanza
instance (typically a message) that was forwarded.public Stanza getForwardedStanza()
Stanza
(typically a message) that was forwarded.public DelayInformation getDelayInformation()
DelayInformation
representing the time when the original stanza(/packet) was sent. May be null.