01: package javax.xml.stream.util;
02:
03: import javax.xml.stream.events.XMLEvent;
04: import javax.xml.stream.XMLStreamException;
05:
06: /**
07: * This interface defines an event consumer interface. The contract of the
08: * of a consumer is to accept the event. This interface can be used to
09: * mark an object as able to receive events. Add may be called several
10: * times in immediate succession so a consumer must be able to cache
11: * events it hasn't processed yet.
12: *
13: * @version 1.0
14: * @author Copyright (c) 2003 by BEA Systems. All Rights Reserved.
15: */
16: public interface XMLEventConsumer {
17:
18: /**
19: * This method adds an event to the consumer. Calling this method
20: * invalidates the event parameter. The client application should
21: * discard all references to this event upon calling add.
22: * The behavior of an application that continues to use such references
23: * is undefined.
24: *
25: * @param event the event to add, may not be null
26: */
27: public void add(XMLEvent event) throws XMLStreamException;
28: }
|