net.java.sip.communicator.impl.protocol.jabber.extensions.jingle
Class ReasonProvider
java.lang.Object
net.java.sip.communicator.impl.protocol.jabber.extensions.jingle.ReasonProvider
- All Implemented Interfaces:
- org.jivesoftware.smack.provider.PacketExtensionProvider
public class ReasonProvider
- extends Object
- implements org.jivesoftware.smack.provider.PacketExtensionProvider
The ReasonProvider parses "reason" elements into ReasonPacketExtension instances.
- Author:
- Emil Ivov
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReasonProvider
public ReasonProvider()
parseExtension
public ReasonPacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser)
throws Exception
- Parses a reason extension sub-packet and creates a
ReasonPacketExtension instance. At the beginning of the method call,
the xml parser will be positioned on the opening element of the packet
extension. As required by the smack API, at the end of the method call,
the parser will be positioned on the closing element of the packet
extension.
- Specified by:
parseExtension in interface org.jivesoftware.smack.provider.PacketExtensionProvider
- Parameters:
parser - an XML parser positioned at the opening reason
element.
- Returns:
- a new
ReasonPacketExtension instance.
- Throws:
Exception - if an error occurs parsing the XML.
parseText
public String parseText(org.xmlpull.v1.XmlPullParser parser)
throws Exception
- Returns the content of the next
XmlPullParser.TEXT element that
we encounter in parser.
- Parameters:
parser - the parse that we'll be probing for text.
- Returns:
- the content of the next
XmlPullParser.TEXT element we
come across or null if we encounter a closing tag first.
- Throws:
Exception - if an error occurs parsing the XML.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.