org.apache.cocoon.xml.sax
Class AbstractSAXProducer

java.lang.Object
  extended by org.apache.cocoon.xml.sax.AbstractSAXProducer
Direct Known Subclasses:
AbstractSAXPipe, DOMStreamer.DefaultDOMStreamer, DOMStreamer.NamespaceNormalizingDOMStreamer

public abstract class AbstractSAXProducer
extends Object

This abstract class provides utility methods to implement a producer for SAX events..

Version:
$Id: AbstractSAXProducer.java 729283 2008-12-24 09:25:21Z cziegeler $

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.
 
Constructor Summary
AbstractSAXProducer()
           
 
Method Summary
 void recycle()
          Recycle the producer by removing references, and resetting handlers to null (empty) implementations.
 void setContentHandler(ContentHandler handler)
          Set the ContentHandler that will receive XML data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_CONTENT_HANDLER

protected static final ContentHandler EMPTY_CONTENT_HANDLER
Empty, do-nothing content handler


contentHandler

protected ContentHandler contentHandler
The ContentHandler receiving SAX events.


lexicalHandler

protected LexicalHandler lexicalHandler
The LexicalHandler receiving SAX events.

Constructor Detail

AbstractSAXProducer

public AbstractSAXProducer()
Method Detail

setContentHandler

public void setContentHandler(ContentHandler handler)
Set the ContentHandler that will receive XML data.

Subclasses may retrieve this ContentHandler instance accessing the protected super.contentHandler field.

Parameters:
handler - content handler, should never be null.

recycle

public void recycle()
Recycle the producer by removing references, and resetting handlers to null (empty) implementations.



Copyright © 1999-2009 The Apache Software Foundation. All Rights Reserved.