|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.util.AbstractLogEnabled org.apache.cocoon.xml.AbstractXMLProducer
This abstract class provides default implementation of the methods specified
by the XMLProducer
interface.
Field Summary | |
protected ContentHandler |
contentHandler
The ContentHandler receiving SAX events. |
protected static ContentHandler |
EMPTY_CONTENT_HANDLER
Empty, do-nothing content handler |
protected LexicalHandler |
lexicalHandler
The LexicalHandler receiving SAX events. |
protected org.apache.cocoon.xml.XMLConsumer |
xmlConsumer
The XMLConsumer receiving SAX events. |
Constructor Summary | |
AbstractXMLProducer()
|
Method Summary | |
void |
recycle()
Recycle the producer by removing references, and resetting handlers to null (empty) implementations. |
void |
setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
Set the XMLConsumer that will receive XML data. |
void |
setContentHandler(ContentHandler handler)
Set the ContentHandler that will receive XML data. |
void |
setLexicalHandler(LexicalHandler handler)
Set the LexicalHandler that will receive XML data. |
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled |
getLogger, setLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final ContentHandler EMPTY_CONTENT_HANDLER
protected org.apache.cocoon.xml.XMLConsumer xmlConsumer
XMLConsumer
receiving SAX events.
protected ContentHandler contentHandler
ContentHandler
receiving SAX events.
protected LexicalHandler lexicalHandler
LexicalHandler
receiving SAX events.
Constructor Detail |
public AbstractXMLProducer()
Method Detail |
public void setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
XMLConsumer
that will receive XML data.
This method will call setContentHandler(consumer)
and setLexicalHandler(consumer)
since XMLConsumer
interface implements both ContentHandler
and LexicalHandler
.
setConsumer
in interface org.apache.cocoon.xml.XMLProducer
consumer
- xml consumer, should never be null.public void setContentHandler(ContentHandler handler)
ContentHandler
that will receive XML data.
Subclasses may retrieve this ContentHandler
instance
accessing the protected super.contentHandler
field.
handler
- content handler, should never be null.public void setLexicalHandler(LexicalHandler handler)
LexicalHandler
that will receive XML data.
Subclasses may retrieve this LexicalHandler
instance
accessing the protected super.lexicalHandler
field.
handler
- lexical handler, should never be null.public void recycle()
recycle
in interface Recyclable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |