Package org.jivesoftware.smack.provider
The Smack provider architecture is a system for plugging in custom XML parsing of staza extensions
(
ExtensionElement
, IQ
stanzas and
Nonza
. Hence, there are the the following providers:
For most users, only extension element and IQ providers should be relevant.
Architecture
Providers are registered with the ProviderManager
. XML elements identified by their
QName
, that is, their qualified name consistent of the XML elements name and its
namespace. The QName is hence used to map XML elements to their provider Whenever a stanza extension is found in a
stanza, parsing will be passed to the correct provider. Each provider is responsible for parsing the XML stream via
Smack's XmlPullParser
.
Unknown Extension Elements
If no extension element provider is registered for an element, then Smack will fall back to parse the "unknown"
element to a StandardExtensionElement
.
Custom Provider Example
SeeIqProvider
for examples.-
Interface Summary Interface Description AbstractProvider.WrappableParser<E> ProviderLoader Used to load providers into theProviderManager
. -
Class Summary Class Description AbstractProvider<E extends Element> BindIQProvider BodyElementProvider EmbeddedExtensionProvider<PE extends XmlElement> This class simplifies parsing of embedded elements by using the Template Method Pattern.ExtensionElementProvider<E extends XmlElement> An abstract class for parsing custom extensions elements.ExtensionProviderInfo Defines the information required to register a stanza extension Provider with theProviderManager
when using theProviderLoader
.IntrospectionProvider Deprecated. use a proper parser.IntrospectionProvider.IQIntrospectionProvider<I extends IQ> Deprecated. use a proper parser.IntrospectionProvider.PacketExtensionIntrospectionProvider<PE extends ExtensionElement> Deprecated. use a proper parser.IqProvider<I extends IQ> An abstract class for parsing customIQ
packets.IQProviderInfo Defines the information required to register an IQ Provider with theProviderManager
when using theProviderLoader
.LegacyIQProvider<I extends IQ> Deprecated. UseIqProvider
insteadMessageSubjectElementProvider MessageThreadElementProvider NonzaProvider<N extends Nonza> Provider<E extends Element> Smack provider are the parsers used to deserialize raw XMPP into the according JavaElement
s.ProviderFileLoader Loads theIqProvider
andExtensionElementProvider
information from a standard provider file in preparation for loading into theProviderManager
.ProviderManager Manages providers for parsing custom XML sub-documents of XMPP packets.SaslChallengeProvider SaslFailureProvider SaslSuccessProvider StreamFeatureProviderInfo TlsFailureProvider TlsProceedProvider -
Exception Summary Exception Description AbstractProvider.NumberFormatParseException AbstractProvider.TextParseException