|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interfaces identifies classes that produce XML data, sending SAX
events to the configured XMLConsumer
.
The XMLProducer is comprised of only one method to give the component the
next element of the pipeline. Cocoon calls the setConsumer()
method with the reference to the next XMLConsumer in the pipeline. The
approach allows the XMLProducer to call the different SAX related methods on
the XMLConsumer without knowing ahead of time what that consumer will be.
The design is very simple and very powerful in that it allows Cocoon to
daisy chain several components in any order and then execute the pipeline.
Any producer can be paired with any consumer and we have a pipeline. The
core design is very powerful and allows the end user to mix and match
sitemap components as they see fit. Cocoon will always call
setConsumer()
on every XMLProducer in a pipeline or it will
throw an exception saying that the pipeline is invalid (i.e. there is no
serializer for the pipeline). The only contract that the XMLProducer has to
worry about is that it must always make calls to the XMLConsumer passed in
through the setConsumer()
method.
Method Summary | |
void |
setConsumer(XMLConsumer consumer)
Set the XMLConsumer that will receive XML data. |
Method Detail |
public void setConsumer(XMLConsumer consumer)
XMLConsumer
that will receive XML data.
consumer
- The XMLConsumer target for SAX events.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |