Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.xml.pipeline
Interface EventConsumer

All Known Implementing Classes:
  CallFilter, DomConsumer, EventFilter, TeeConsumer, TextConsumer

public interface EventConsumer

Collects the event consumption apparatus of a SAX pipeline stage. Consumers which permit some handlers or other characteristics to be configured will provide methods to support that configuration.

Two important categories of consumers include filters, which process events and pass them on to other consumers, and terminus (or terminal) stages, which don't pass events on. Filters are not necessarily derived from the `EventFilter` class, although that class can substantially simplify their construction by automating the most common activities.

Event consumers which follow certain conventions for the signatures of their constructors can be automatically assembled into pipelines by the `PipelineFactory` class.

Version:
  $Date: 2001/10/23 17:42:25 $
Author:
  David Brownell

Method Summary
`ContentHandler` | `getContentHandler()` Most stages process these core SAX callbacks.
`DTDHandler` | `getDTDHandler()` Few stages will use unparsed entities.
`java.lang.Object` | `getProperty(java.lang.String id)` This method works like the SAX2 XMLReader method of the same name, and is used to retrieve the optional lexical and declaration handlers in a pipeline.
`void` | `setErrorHandler(ErrorHandler handler)` This method provides a filter stage with a handler that abstracts presentation of warnings and both recoverable and fatal errors.

Method Detail

### getContentHandler

    public ContentHandler getContentHandler()

  Most stages process these core SAX callbacks.

### getDTDHandler

    public DTDHandler getDTDHandler()

  Few stages will use unparsed entities.

### getProperty

    public java.lang.Object getProperty(java.lang.String id)
                                 throws SAXNotRecognizedException

  This method works like the SAX2 XMLReader method of the same name, and is used to retrieve the optional lexical and declaration handlers in a pipeline.
  Parameters:
    `id` - This is a URI identifying the type of property desired.
  Returns:
    The value of that property, if it is defined.
  Throws:
    `SAXNotRecognizedException` - Thrown if the particular pipeline stage does not understand the specified identifier.

### setErrorHandler

    public void setErrorHandler(ErrorHandler handler)

  This method provides a filter stage with a handler that abstracts presentation of warnings and both recoverable and fatal errors. Most pipeline stages should share a single policy and mechanism for such reports, since application components require consistency in such activities. Accordingly, typical responses to this method invocation involve saving the handler for use; filters will pass it on to any other consumers they use.
  Parameters:
    `handler` - encapsulates error handling policy for this stage

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Source code is under GPL (with library exception) in the JAXP project at http://www.gnu.org/software/classpathx/jaxp
This documentation was derived from that source code on 2001-11-20.