Package org.jivesoftware.smack.provider
Class Provider<E extends Element>
java.lang.Object
org.jivesoftware.smack.provider.AbstractProvider<E>
org.jivesoftware.smack.provider.Provider<E>
- Type Parameters:
E- the type of the resulting element.
- Direct Known Subclasses:
ExtensionElementProvider,NonzaProvider
Smack provider are the parsers used to deserialize raw XMPP into the according Java
Elements.
At any time when parse(XmlPullParser, int, XmlEnvironment, JxmppContext) is invoked any type of exception can be thrown. If the parsed
element does not follow the specification, for example by putting a string where only integers are allowed, then a
SmackException should be thrown.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jivesoftware.smack.provider.AbstractProvider
AbstractProvider.NumberFormatParseException, AbstractProvider.TextParseException, AbstractProvider.WrappableParser<E> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Eparse(org.jivesoftware.smack.xml.XmlPullParser parser) abstract Eparse(org.jivesoftware.smack.xml.XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment, org.jxmpp.JxmppContext jxmppContext) final Eparse(org.jivesoftware.smack.xml.XmlPullParser parser, XmlEnvironment outerXmlEnvironment, org.jxmpp.JxmppContext jxmppContext) Methods inherited from class org.jivesoftware.smack.provider.AbstractProvider
getElementClass, toUrl, wrapExceptions
-
Constructor Details
-
Provider
public Provider()
-
-
Method Details
-
parse
public final E parse(org.jivesoftware.smack.xml.XmlPullParser parser) throws IOException, org.jivesoftware.smack.xml.XmlPullParserException, SmackParsingException - Throws:
IOExceptionorg.jivesoftware.smack.xml.XmlPullParserExceptionSmackParsingException
-
parse
public final E parse(org.jivesoftware.smack.xml.XmlPullParser parser, XmlEnvironment outerXmlEnvironment, org.jxmpp.JxmppContext jxmppContext) throws IOException, org.jivesoftware.smack.xml.XmlPullParserException, SmackParsingException - Throws:
IOExceptionorg.jivesoftware.smack.xml.XmlPullParserExceptionSmackParsingException
-
parse
public abstract E parse(org.jivesoftware.smack.xml.XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment, org.jxmpp.JxmppContext jxmppContext) throws org.jivesoftware.smack.xml.XmlPullParserException, IOException, SmackParsingException, ParseException - Throws:
org.jivesoftware.smack.xml.XmlPullParserExceptionIOExceptionSmackParsingExceptionParseException
-