|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.smack.util.PacketParserUtils
public class PacketParserUtils
Utility class that helps to parse packets. Any parsing packets method that must be shared between many clients must be placed in this utility class.
Nested Class Summary | |
---|---|
static class |
PacketParserUtils.UnparsedResultIQ
This class represents and unparsed IQ of the type 'result'. |
Constructor Summary | |
---|---|
PacketParserUtils()
|
Method Summary | |
---|---|
static java.util.Collection<java.lang.String> |
parseCompressionMethods(org.xmlpull.v1.XmlPullParser parser)
Parse the available compression methods reported from the server. |
static XMPPError |
parseError(org.xmlpull.v1.XmlPullParser parser)
Parses error sub-packets. |
static IQ |
parseIQ(org.xmlpull.v1.XmlPullParser parser,
Connection connection)
Parses an IQ packet. |
static java.util.Collection<java.lang.String> |
parseMechanisms(org.xmlpull.v1.XmlPullParser parser)
Parse the available SASL mechanisms reported from the server. |
static Packet |
parseMessage(org.xmlpull.v1.XmlPullParser parser)
Parses a message packet. |
static PacketExtension |
parsePacketExtension(java.lang.String elementName,
java.lang.String namespace,
org.xmlpull.v1.XmlPullParser parser)
Parses a packet extension sub-packet. |
static Presence |
parsePresence(org.xmlpull.v1.XmlPullParser parser)
Parses a presence packet. |
static java.util.Map<java.lang.String,java.lang.Object> |
parseProperties(org.xmlpull.v1.XmlPullParser parser)
Parse a properties sub-packet. |
static SASLMechanism.Failure |
parseSASLFailure(org.xmlpull.v1.XmlPullParser parser)
Parses SASL authentication error packets. |
static StreamError |
parseStreamError(org.xmlpull.v1.XmlPullParser parser)
Parses stream error packets. |
static java.lang.Object |
parseWithIntrospection(java.lang.String elementName,
java.lang.Class<?> objectClass,
org.xmlpull.v1.XmlPullParser parser)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PacketParserUtils()
Method Detail |
---|
public static Packet parseMessage(org.xmlpull.v1.XmlPullParser parser) throws java.lang.Exception
parser
- the XML parser, positioned at the start of a message packet.
java.lang.Exception
- if an exception occurs while parsing the packet.public static Presence parsePresence(org.xmlpull.v1.XmlPullParser parser) throws java.lang.Exception
parser
- the XML parser, positioned at the start of a presence packet.
java.lang.Exception
- if an exception occurs while parsing the packet.public static IQ parseIQ(org.xmlpull.v1.XmlPullParser parser, Connection connection) throws java.lang.Exception
parser
- the XML parser, positioned at the start of an IQ packet.
java.lang.Exception
- if an exception occurs while parsing the packet.public static java.util.Collection<java.lang.String> parseMechanisms(org.xmlpull.v1.XmlPullParser parser) throws java.lang.Exception
parser
- the XML parser, positioned at the start of the mechanisms stanza.
java.lang.Exception
- if an exception occurs while parsing the stanza.public static java.util.Collection<java.lang.String> parseCompressionMethods(org.xmlpull.v1.XmlPullParser parser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
parser
- the XML parser, positioned at the start of the compression stanza.
java.lang.Exception
- if an exception occurs while parsing the stanza.
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static java.util.Map<java.lang.String,java.lang.Object> parseProperties(org.xmlpull.v1.XmlPullParser parser) throws java.lang.Exception
parser
- the XML parser, positioned at the start of a properties sub-packet.
java.lang.Exception
- if an error occurs while parsing the properties.public static SASLMechanism.Failure parseSASLFailure(org.xmlpull.v1.XmlPullParser parser) throws java.lang.Exception
parser
- the XML parser.
java.lang.Exception
- if an exception occurs while parsing the packet.public static StreamError parseStreamError(org.xmlpull.v1.XmlPullParser parser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException
parser
- the XML parser.
java.lang.Exception
- if an exception occurs while parsing the packet.
java.io.IOException
org.xmlpull.v1.XmlPullParserException
public static XMPPError parseError(org.xmlpull.v1.XmlPullParser parser) throws java.lang.Exception
parser
- the XML parser.
java.lang.Exception
- if an exception occurs while parsing the packet.public static PacketExtension parsePacketExtension(java.lang.String elementName, java.lang.String namespace, org.xmlpull.v1.XmlPullParser parser) throws java.lang.Exception
elementName
- the XML element name of the packet extension.namespace
- the XML namespace of the packet extension.parser
- the XML parser, positioned at the starting element of the extension.
java.lang.Exception
- if a parsing error occurs.public static java.lang.Object parseWithIntrospection(java.lang.String elementName, java.lang.Class<?> objectClass, org.xmlpull.v1.XmlPullParser parser) throws java.lang.Exception
java.lang.Exception
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |