org.jabber.jabberbeans.sax
Class MessageHandler
java.lang.Object
|
+--org.jabber.jabberbeans.sax.SubHandler
|
+--org.jabber.jabberbeans.sax.PacketSubHandler
|
+--org.jabber.jabberbeans.sax.MessageHandler
- public final class MessageHandler
- extends PacketSubHandler
This is the SubHandler for "<message>" objects. It uses a MessageBuilder
object to parse and create Message objects from the incoming XML, and
notifies the main bean (MessengerBean) when either a new message arrives,
an error arrives on an attempted sent message, or an error arrives in the
server XML.
- Version:
- $Revision: 1.1.1.1 $
- Author:
- David Waite
<dwaite@jabber.com>, $Author: lucky $
Field Summary |
private static java.lang.String[] |
elementTypes
list of element types specific to <message> packets |
Constructor Summary |
MessageHandler()
Creates a new MessageHandler instance. |
Method Summary |
protected void |
packetEndElement(java.lang.String name)
packetEndElement notifies the end of a particular
element type, which is used to register the data in a particular
element with the builder. |
protected boolean |
packetStartElement(java.lang.String name,
AttributeList attributes)
this method verifies that elements are handled by this handler,
returning false if they aren't |
Methods inherited from class org.jabber.jabberbeans.sax.SubHandler |
endDocument,
endElement,
getHandlerFactory,
getSubCount,
graftParent,
graftSubHandler,
ignorableWhitespace,
processingInstruction,
setChildSubHandler,
setDocumentLocator,
setHandlerFactory,
setParent,
setParser,
startDocument,
startElement |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
elementTypes
private static final java.lang.String[] elementTypes
- list of element types specific to <message> packets
MessageHandler
public MessageHandler()
- Creates a new
MessageHandler
instance.
packetStartElement
protected final boolean packetStartElement(java.lang.String name,
AttributeList attributes)
- this method verifies that elements are handled by this handler,
returning false if they aren't
- Overrides:
- packetStartElement in class PacketSubHandler
- Tags copied from class: PacketSubHandler
- Returns:
- a
boolean
value of false if the tag should be
referred to the extension factory. Basically a 'handled' bit. - Throws:
- SAXException - if an error occurs
packetEndElement
protected final void packetEndElement(java.lang.String name)
throws SAXException
packetEndElement
notifies the end of a particular
element type, which is used to register the data in a particular
element with the builder.
- Overrides:
- packetEndElement in class PacketSubHandler
- Parameters:
name
- a String
holding the element name- Throws:
- SAXException - if there is a SAX parsing exception, such
as a mismatched element tag