Abstract transformer could/should be used for each StAXTransformer. This class implements the default behavior of the StAXConsumer and the StAXConsumer interfaces. Further more the AbstractStAXTransformer contains the queuing for StAX-events. This transformer abstracts the entire handling of nextEvent() and peek() behind a template method produceEvents() which saves all produced events in a buffer and handles peek(), nextEvent() and hasNext().
Adds a Collection of XMLEvents to an internal Queue.
Add a specific XMLEvent to an internal Queue.
This StAXProducer is the parent of the module overwriting this AbstractStAXTransformer.
Since the workflow in a pull pipeline is completely inverted compared to for example a SAX pipeline, this method is required to push the Starter.execute() to the Finisher which should start processing.
Checks and returns if the internal Queue of XMLEvents is empty.
Template method which has to produce at least one XMLEvent and should add this to the internal Queue with the #add(XMLEvent) and #addAll(Collection) methods.
Used to connect a consumer to it's producer.
Used to connect a consumer to it's producer. As to the nature of the control inversion and pulling it is required to specify a parent, which provides the consumer with events to consume. This function is called when the pipeline sets it's consumers.
XMLStreamException - Error which could occure during producing events.
event - which should be added to the queue.
This StAXProducer is the parent of the module overwriting this AbstractStAXTransformer. It could be used in the produceEvents() method to pull events from the parent or ask if it still has some.
events - are a Collection of XMLEvents which should be added to an internal Queue.
Template method which has to produce at least one XMLEvent and should add this to the internal Queue with the #add(XMLEvent) and #addAll(Collection) methods. If no XMLEvent is added by this method to the internal Queue an exception is thrown.
XMLStreamException - thrown if the StAXProducer.nextEvent() or the StAXProducer.peek() method, called in the produceEvents() method throw any exceptions they have to be forwarded to the end of the pipeline.