public class CarbonExtension
extends java.lang.Object
implements org.jivesoftware.smack.packet.ExtensionElement
It accomplishes this by wrapping a Forwarded
stanza(/packet) in a sent
or received element
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,
org.jivesoftware.smackx.forward.packet.Forwarded fwd)
Construct a Carbon message extension.
|
Modifier and Type | Method and Description |
---|---|
static CarbonExtension |
from(org.jivesoftware.smack.packet.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() |
org.jivesoftware.smackx.forward.packet.Forwarded |
getForwarded()
Get the forwarded packet.
|
static CarbonExtension |
getFrom(org.jivesoftware.smack.packet.Message msg)
Deprecated.
use
from(Message) instead |
java.lang.String |
getNamespace() |
org.jivesoftware.smack.util.XmlStringBuilder |
toXML() |
public static final java.lang.String NAMESPACE
public CarbonExtension(CarbonExtension.Direction dir, org.jivesoftware.smackx.forward.packet.Forwarded fwd)
dir
- Determines if the carbon is being sent/receivedfwd
- The forwarded message.public CarbonExtension.Direction getDirection()
CarbonExtension.Direction
of the carbon.public org.jivesoftware.smackx.forward.packet.Forwarded getForwarded()
Forwarded
message contained in this Carbon.public java.lang.String getElementName()
getElementName
in interface org.jivesoftware.smack.packet.NamedElement
public java.lang.String getNamespace()
getNamespace
in interface org.jivesoftware.smack.packet.ExtensionElement
public org.jivesoftware.smack.util.XmlStringBuilder toXML()
toXML
in interface org.jivesoftware.smack.packet.Element
@Deprecated public static CarbonExtension getFrom(org.jivesoftware.smack.packet.Message msg)
from(Message)
instead
Only Message
instances can contain a Carbon extensions.
msg
- Message object to check for carbonspublic static CarbonExtension from(org.jivesoftware.smack.packet.Message msg)
Only Message
instances can contain a Carbon extensions.
msg
- Message object to check for carbons