org.apache.cocoon.xml
Class AbstractXMLProducer
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.cocoon.xml.AbstractXMLProducer
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, XMLProducer
- Direct Known Subclasses:
- AbstractEventPipeline, AbstractGenerator, AbstractXMLPipe, DocumentHandlerAdapter, DOMStreamer, JaxpParser, XercesParser, XMLByteStreamInterpreter
- public abstract class AbstractXMLProducer
- extends org.apache.avalon.framework.logger.AbstractLoggable
- implements XMLProducer, org.apache.avalon.excalibur.pool.Recyclable
This abstract class provides default implementation of the methods specified
by the XMLProducer
interface.
- Version:
- CVS $Id: AbstractXMLProducer.java,v 1.5 2002/02/22 07:03:58 cziegeler Exp $
- Author:
- Pierpaolo Fumagalli
(Apache Software Foundation, Exoffice Technologies)
Field Summary |
protected org.xml.sax.ContentHandler |
contentHandler
The ContentHandler receiving SAX events. |
protected org.xml.sax.ext.LexicalHandler |
lexicalHandler
The LexicalHandler receiving SAX events. |
protected XMLConsumer |
xmlConsumer
The XMLConsumer receiving SAX events. |
Method Summary |
void |
recycle()
Recycle the producer by removing references |
void |
setConsumer(XMLConsumer consumer)
Set the XMLConsumer that will receive XML data.
|
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Set the ContentHandler that will receive XML data.
|
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Set the LexicalHandler that will receive XML data.
|
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xmlConsumer
protected XMLConsumer xmlConsumer
- The
XMLConsumer
receiving SAX events.
contentHandler
protected org.xml.sax.ContentHandler contentHandler
- The
ContentHandler
receiving SAX events.
lexicalHandler
protected org.xml.sax.ext.LexicalHandler lexicalHandler
- The
LexicalHandler
receiving SAX events.
AbstractXMLProducer
public AbstractXMLProducer()
setConsumer
public void setConsumer(XMLConsumer consumer)
- Set the
XMLConsumer
that will receive XML data.
This method will simply call setContentHandler(consumer)
and setLexicalHandler(consumer)
.
- Specified by:
setConsumer
in interface XMLProducer
setContentHandler
public void setContentHandler(org.xml.sax.ContentHandler handler)
- Set the
ContentHandler
that will receive XML data.
Subclasses may retrieve this ContentHandler
instance
accessing the protected super.contentHandler
field.
setLexicalHandler
public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
- Set the
LexicalHandler
that will receive XML data.
Subclasses may retrieve this LexicalHandler
instance
accessing the protected super.lexicalHandler
field.
- Throws:
java.lang.IllegalStateException
- If the LexicalHandler
or
the XMLConsumer
were
already set.
recycle
public void recycle()
- Recycle the producer by removing references
- Specified by:
recycle
in interface org.apache.avalon.excalibur.pool.Recyclable
Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.