Package org.igniterealtime.jbosh
Class AbstractBody
java.lang.Object
org.igniterealtime.jbosh.AbstractBody
- Direct Known Subclasses:
ComposableBody
,StaticBody
Class representing a single message to or from the BOSH connection
manager (CM).
These messages consist of a single
body
element
(qualified within the BOSH namespace:
http://jabber.org/protocol/httpbind
) and contain zero or more
child elements (of any namespace). These child elements constitute the
message payload.
In addition to the message payload, the attributes of the wrapper
body
element may also need to be used as part of the communication
protocol being implemented on top of BOSH, or to define additional
namespaces used by the child "payload" elements. These attributes are
exposed via accessors.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal String
getAttribute
(BodyQName attr) Get the value of the specified attribute.Get a set of all defined attribute names.Get a map of all defined attribute names with their corresponding values.(package private) static BodyQName
Returns the qualified name of the root/wrapper element.abstract String
toXML()
Get an XML String representation of this message.
-
Constructor Details
-
AbstractBody
AbstractBody()Restrict subclasses to the local package.
-
-
Method Details
-
getAttributeNames
Get a set of all defined attribute names.- Returns:
- set of qualified attribute names
-
getAttribute
Get the value of the specified attribute.- Parameters:
attr
- name of the attribute to retriece- Returns:
- attribute value, or
null
if not defined
-
getAttributes
Get a map of all defined attribute names with their corresponding values.- Returns:
- map of qualified attributes
-
toXML
Get an XML String representation of this message.- Returns:
- XML string representing the body message
-
getBodyQName
Returns the qualified name of the root/wrapper element.- Returns:
- qualified name
-