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 extension.
|
Forwarded(Stanza fwdPacket)
Creates a new Forwarded stanza extension.
|
| Modifier and Type | Method and Description |
|---|---|
static List<Message> |
extractMessagesFrom(Collection<Forwarded> forwardedCollection)
Extract messages in a collection of forwarded elements.
|
static Forwarded |
from(Stanza packet)
Get the forwarded extension.
|
DelayInformation |
getDelayInformation()
get the timestamp of the forwarded packet.
|
String |
getElementName()
Returns the root element name.
|
Stanza |
getForwardedPacket()
Deprecated.
use @{link
getForwardedStanza()} instead. |
Stanza |
getForwardedStanza()
Get the forwarded Stanza found in this extension.
|
String |
getNamespace()
Returns the root element XML namespace.
|
XmlStringBuilder |
toXML(String enclosingNamespace)
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 that is forwarded (required).public String getElementName()
NamedElementgetElementName in interface NamedElementpublic String getNamespace()
ExtensionElementgetNamespace in interface ExtensionElementpublic XmlStringBuilder toXML(String enclosingNamespace)
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 was sent. May be null.public static Forwarded from(Stanza packet)
packet - public static List<Message> extractMessagesFrom(Collection<Forwarded> forwardedCollection)
Forwarded in
the given collection only contain Message stanzas.forwardedCollection - the collection to extract from.