public class Forwarded extends Object implements PacketExtension
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT_NAME |
static String |
NAMESPACE |
Constructor and Description |
---|
Forwarded(DelayInfo delay,
Packet fwdPacket)
Creates a new Forwarded packet extension.
|
Forwarded(Packet fwdPacket)
Creates a new Forwarded packet extension.
|
Modifier and Type | Method and Description |
---|---|
DelayInfo |
getDelayInfo()
get the timestamp of the forwarded packet.
|
String |
getElementName()
Returns the root element name.
|
Packet |
getForwardedPacket()
get the packet forwarded by this stanza.
|
String |
getNamespace()
Returns the root element XML namespace.
|
String |
toXML()
Returns the XML representation of the PacketExtension.
|
public static final String NAMESPACE
public static final String ELEMENT_NAME
public Forwarded(DelayInfo delay, Packet fwdPacket)
delay
- an optional DelayInfo
timestamp of the packet.fwdPacket
- the packet that is forwarded (required).public String getElementName()
PacketExtension
getElementName
in interface PacketExtension
public String getNamespace()
PacketExtension
getNamespace
in interface PacketExtension
public String toXML()
PacketExtension
toXML
in interface PacketExtension
public Packet getForwardedPacket()
Packet
instance (typically a message) that was forwarded.public DelayInfo getDelayInfo()
DelayInfo
representing the time when the original packet was sent. May be null.