public class PacketParserUtils extends Object
Constructor and Description |
---|
PacketParserUtils() |
Modifier and Type | Method and Description |
---|---|
static Collection<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 Collection<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(String elementName,
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 Map<String,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 Object |
parseWithIntrospection(String elementName,
Class objectClass,
org.xmlpull.v1.XmlPullParser parser) |
public static Packet parseMessage(org.xmlpull.v1.XmlPullParser parser) throws Exception
parser
- the XML parser, positioned at the start of a message packet.Exception
- if an exception occurs while parsing the packet.public static Presence parsePresence(org.xmlpull.v1.XmlPullParser parser) throws Exception
parser
- the XML parser, positioned at the start of a presence packet.Exception
- if an exception occurs while parsing the packet.public static IQ parseIQ(org.xmlpull.v1.XmlPullParser parser, Connection connection) throws Exception
parser
- the XML parser, positioned at the start of an IQ packet.Exception
- if an exception occurs while parsing the packet.public static Collection<String> parseMechanisms(org.xmlpull.v1.XmlPullParser parser) throws Exception
parser
- the XML parser, positioned at the start of the mechanisms stanza.Exception
- if an exception occurs while parsing the stanza.public static Collection<String> parseCompressionMethods(org.xmlpull.v1.XmlPullParser parser) throws IOException, org.xmlpull.v1.XmlPullParserException
parser
- the XML parser, positioned at the start of the compression stanza.Exception
- if an exception occurs while parsing the stanza.IOException
org.xmlpull.v1.XmlPullParserException
public static Map<String,Object> parseProperties(org.xmlpull.v1.XmlPullParser parser) throws Exception
parser
- the XML parser, positioned at the start of a properties sub-packet.Exception
- if an error occurs while parsing the properties.public static SASLMechanism.Failure parseSASLFailure(org.xmlpull.v1.XmlPullParser parser) throws Exception
parser
- the XML parser.Exception
- if an exception occurs while parsing the packet.public static StreamError parseStreamError(org.xmlpull.v1.XmlPullParser parser) throws IOException, org.xmlpull.v1.XmlPullParserException
parser
- the XML parser.Exception
- if an exception occurs while parsing the packet.IOException
org.xmlpull.v1.XmlPullParserException
public static XMPPError parseError(org.xmlpull.v1.XmlPullParser parser) throws Exception
parser
- the XML parser.Exception
- if an exception occurs while parsing the packet.public static PacketExtension parsePacketExtension(String elementName, String namespace, org.xmlpull.v1.XmlPullParser parser) throws 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.Exception
- if a parsing error occurs.Copyright © 2003-2007 Jive Software.