|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jabber.jabberbeans.sax.SubHandler | +--org.jabber.jabberbeans.sax.Extension.SerializingHandler
Handler class to build DefaultExtension objects (objects without a supplied custom handler). This serializes the data back out to equivalent XML
Constructor Summary | |
SerializingHandler()
Creates a new SerializingHandler instance. |
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
This is an exact copy of the characters function in the main handler |
void |
handleEndElement(java.lang.String name)
This is an exact copy of the end element in the main handler |
void |
handleStartElement(java.lang.String name,
AttributeList attributes)
This is an exact copy of the start element in the main handler. |
void |
receiveChildData(SubHandler subHandler,
java.lang.Object data)
received data handler from subobjects. |
void |
reset()
reset the handler to a default state, for possible reuse. |
void |
startHandler(java.lang.String name,
AttributeList attributes)
Gets called when the underlying engine decides to pass an entity and all sub-entities off to your subhandler. |
java.lang.Object |
stopHandler(java.lang.String name)
Stophandler is the same as end element, except that it is called saying that the subhandler is no longer in scope. |
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, toString, wait, wait, wait |
Constructor Detail |
public SerializingHandler()
SerializingHandler
instance.
Method Detail |
public void startHandler(java.lang.String name, AttributeList attributes) throws SAXException
Upon seeing the element that this subhandler handles, we call this constructor, passing in the attributes.
startHandler
in class SubHandler
attributes
- a value of type 'AttributeList'name
- name of the element which we are handling.
SAXException
public void handleStartElement(java.lang.String name, AttributeList attributes) throws SAXException
handleStartElement
in class SubHandler
name
- string that holds the element nameattributes
- AttributeList of attributes going with this element
SAXException
- thrown on error (unexpected element)public void handleEndElement(java.lang.String name) throws SAXException
handleEndElement
in class SubHandler
name
- string holding the element name
SAXException
- thrown on errorpublic void characters(char[] ch, int start, int length) throws SAXException
characters
in interface DocumentHandler
characters
in class SubHandler
ch
- character string detectedstart
- start positionlength
- length of string
SAXException
- thrown on errorpublic java.lang.Object stopHandler(java.lang.String name) throws SAXException
stopHandler
in class SubHandler
SAXException
public void reset()
public void receiveChildData(SubHandler subHandler, java.lang.Object data)
receiveChildData
in class SubHandler
subHandler
- child subhandler which is returningdata
- Object which the child is returning
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |