KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > tools > xjc > runtime > SAXUnmarshallerHandler


1 package com.sun.tools.xjc.runtime;
2
3 import javax.xml.bind.UnmarshallerHandler;
4 import javax.xml.bind.ValidationEvent;
5
6 import org.xml.sax.SAXException JavaDoc;
7
8 /**
9  * Unified event handler that processes
10  * both the SAX events and error events.
11  *
12  * <p>
13  * This interface refines {@link ContentHandler} as follows:
14  * <ol>
15  * <li>element names and attribute names must be {@link String#intern()}ed.
16  * <li>namespace prefix and uris must be {@link String#intern()}ed.
17  * </ol>
18  */

19 public interface SAXUnmarshallerHandler extends UnmarshallerHandler {
20     
21     /**
22      * Reports an error to the user, and asks if s/he wants
23      * to recover. If the canRecover flag is false, regardless
24      * of the client instruction, an exception will be thrown.
25      *
26      * Only if the flag is true and the user wants to recover from an error,
27      * the method returns normally.
28      *
29      * The thrown exception will be catched by the unmarshaller.
30      */

31     void handleEvent( ValidationEvent event, boolean canRecover ) throws SAXException JavaDoc;
32 }
33
Popular Tags