1 /* 2 * Copyright 2005 Werner Guttmann 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 * $Id$ 17 */ 18 19 package org.exolab.castor.xml; 20 21 import org.xml.sax.ContentHandler; 22 23 /** 24 * A interface which abstracts anything which can produce SAX 2 events. 25 * This allows any EventProducer to be used with the Unmarshaller. 26 * @author <a href="mailto:werner DOT guttmann AT gmx DOT net">Werner Guttmann</a> 27 * @version $Revision$ $Date: 2006-02-22 09:05:40 -0700 (Wed, 22 Feb 2006) $ 28 * @since 1.0M3 29 **/ 30 public interface SAX2EventProducer { 31 32 /** 33 * Sets the SAX2 ContentHandler to send SAX 2 events to 34 */ 35 public void setContentHandler(ContentHandler contentHandler); 36 37 /** 38 * Signals to start producing events. 39 */ 40 public void start() throws org.xml.sax.SAXException; 41 42 }