KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > stream > util > XMLEventConsumer


1 package javax.xml.stream.util;
2
3 import javax.xml.stream.events.XMLEvent;
4 import javax.xml.stream.XMLStreamException;
5
6 /**
7  * This interface defines an event consumer interface. The contract of the
8  * of a consumer is to accept the event. This interface can be used to
9  * 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  * @since 1.6
16  */

17 public interface XMLEventConsumer {
18
19   /**
20    * This method adds an event to the consumer. Calling this method
21    * invalidates the event parameter. The client application should
22    * discard all references to this event upon calling add.
23    * The behavior of an application that continues to use such references
24    * is undefined.
25    *
26    * @param event the event to add, may not be null
27    */

28   public void add(XMLEvent event)
29     throws XMLStreamException;
30 }
31
Popular Tags