public class CarbonExtension extends java.lang.Object implements ExtensionElement
| Modifier and Type | Class and Description |
|---|---|
static class |
CarbonExtension.Direction
Defines the direction of a
CarbonExtension message. |
static class |
CarbonExtension.Private
Stanza(/Packet) extension indicating that a message may not be carbon-copied.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAMESPACE |
| Constructor and Description |
|---|
CarbonExtension(CarbonExtension.Direction dir,
Forwarded fwd)
Construct a Carbon message extension.
|
| Modifier and Type | Method and Description |
|---|---|
static CarbonExtension |
from(Message msg)
Obtain a Carbon from a message, if available.
|
CarbonExtension.Direction |
getDirection()
Get the direction (sent or received) of the carbon.
|
java.lang.String |
getElementName()
Returns the root element name.
|
Forwarded |
getForwarded()
Get the forwarded packet.
|
static CarbonExtension |
getFrom(Message msg)
Deprecated.
use
from(Message) instead |
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 CarbonExtension(CarbonExtension.Direction dir, Forwarded fwd)
dir - Determines if the carbon is being sent/receivedfwd - The forwarded message.public CarbonExtension.Direction getDirection()
CarbonExtension.Direction of the carbon.public Forwarded getForwarded()
Forwarded message contained in this Carbon.public java.lang.String getElementName()
NamedElementgetElementName in interface NamedElementpublic java.lang.String getNamespace()
ExtensionElementgetNamespace in interface ExtensionElementpublic XmlStringBuilder toXML()
Element@Deprecated public static CarbonExtension getFrom(Message msg)
from(Message) instead
Only Message instances can contain a Carbon extensions.
msg - Message object to check for carbonspublic static CarbonExtension from(Message msg)
Only Message instances can contain a Carbon extensions.
msg - Message object to check for carbons