public class CarbonExtension extends 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.
|
| 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.
|
String |
getElementName()
Returns the root element name.
|
Forwarded |
getForwarded()
Get the forwarded packet.
|
static CarbonExtension |
getFrom(Message msg)
Deprecated.
use
from(Message) instead |
String |
getNamespace()
Returns the root element XML namespace.
|
XmlStringBuilder |
toXML()
Returns the XML representation of this Element.
|
public static final 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 String getElementName()
NamedElementgetElementName in interface NamedElementpublic 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