|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.JabberMessageHandler
com.echomine.jabber.JDOMMessageHandler
public class JDOMMessageHandler
The JDOM MessageHandler is the default handler for all incoming messages. It simply takes all incoming messages and put them into a JDOM tree structure that can later be queried and manipulated. JDOM is provided as part of the distribution.
Normally, this will be the base class for all other message handlers. "Subhandlers" normally work directly with the DOM tree and don't have to worry about SAX events. If you're not interested in using JDOM as the base handler, you can create your own MessageHandler and handle the messages your own way.
Constructor Summary | |
---|---|
JDOMMessageHandler(JabberMessageParser msgParser)
|
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
the methods that must be implemented to work with the XML content that's coming in |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
the methods that must be implemented to work with the XML content that's coming in |
void |
endMessage()
This method is called when the end of the message is reached. |
Element |
getDOM()
obtains the DOM tree that is associated with this message handler. |
JabberMessage |
getMessage()
the method actually has the parser parse the message. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attr)
the methods that must be implemented to work with the XML content that's coming in |
void |
startMessage()
This method is called when the beginning of the message is received. |
Methods inherited from class com.echomine.jabber.JabberMessageHandler |
---|
getMessageParser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JDOMMessageHandler(JabberMessageParser msgParser)
Method Detail |
---|
public void startMessage()
startMessage
in class JabberMessageHandler
public void endMessage()
endMessage
in class JabberMessageHandler
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attr)
JabberMessageHandler
startElement
in class JabberMessageHandler
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
JabberMessageHandler
endElement
in class JabberMessageHandler
public void characters(char[] ch, int start, int length)
JabberMessageHandler
characters
in class JabberMessageHandler
public Element getDOM()
public JabberMessage getMessage()
getMessage
in class JabberMessageHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |