Class CarbonExtension
java.lang.Object
org.jivesoftware.smackx.carbons.packet.CarbonExtension
- All Implemented Interfaces:
Element
,NamedElement
,XmlElement
,XmlLangElement
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Defines the direction of aCarbonExtension
message.static final class
Stanza extension indicating that a message may not be carbon-copied. -
Field Summary
-
Constructor Summary
ConstructorDescriptionCarbonExtension
(CarbonExtension.Direction dir, Forwarded<Message> fwd) Construct a Carbon message extension. -
Method Summary
Modifier and TypeMethodDescriptionstatic CarbonExtension
Obtain a Carbon from a message, if available.Get the direction (sent or received) of the carbon.Returns the root element name.Get the forwarded packet.static CarbonExtension
Deprecated.Returns the root element XML namespace.toXML
(XmlEnvironment enclosingNamespace) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jivesoftware.smack.packet.XmlElement
getLanguage, getQName
-
Field Details
-
NAMESPACE
- See Also:
-
-
Constructor Details
-
CarbonExtension
Construct a Carbon message extension.- Parameters:
dir
- Determines if the carbon is being sent/receivedfwd
- The forwarded message.
-
-
Method Details
-
getDirection
Get the direction (sent or received) of the carbon.- Returns:
- the
CarbonExtension.Direction
of the carbon.
-
getForwarded
Get the forwarded packet.- Returns:
- the
Forwarded
message contained in this Carbon.
-
getElementName
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
Description copied from interface:XmlElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceXmlElement
- Returns:
- the namespace.
-
toXML
-
getFrom
Deprecated.usefrom(Message)
insteadObtain a Carbon from a message, if available.Only
Message
instances can contain a Carbon extensions.- Parameters:
msg
- Message object to check for carbons- Returns:
- a Carbon if available, null otherwise.
-
from
Obtain a Carbon from a message, if available.Only
Message
instances can contain a Carbon extensions.- Parameters:
msg
- Message object to check for carbons- Returns:
- a Carbon if available, null otherwise.
-
from(Message)
instead