Path: blob/aarch64-shenandoah-jdk8u272-b10/jaxp/src/javax/xml/stream/util/XMLEventConsumer.java
48576 views
/*1* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.2*3* This code is free software; you can redistribute it and/or modify it4* under the terms of the GNU General Public License version 2 only, as5* published by the Free Software Foundation. Oracle designates this6* particular file as subject to the "Classpath" exception as provided7* by Oracle in the LICENSE file that accompanied this code.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*/2324/*25* Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.26*/2728package javax.xml.stream.util;2930import javax.xml.stream.events.XMLEvent;31import javax.xml.stream.XMLStreamException;3233/**34* This interface defines an event consumer interface. The contract of the35* of a consumer is to accept the event. This interface can be used to36* mark an object as able to receive events. Add may be called several37* times in immediate succession so a consumer must be able to cache38* events it hasn't processed yet.39*40* @version 1.041* @author Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.42* @since 1.643*/44public interface XMLEventConsumer {4546/**47* This method adds an event to the consumer. Calling this method48* invalidates the event parameter. The client application should49* discard all references to this event upon calling add.50* The behavior of an application that continues to use such references51* is undefined.52*53* @param event the event to add, may not be null54*/55public void add(XMLEvent event)56throws XMLStreamException;57}585960