1
2
3
4
5
6
7
8 package net.sf.jour.config.impl.runtime;
9
10 import javax.xml.bind.UnmarshallerHandler;
11 import javax.xml.bind.ValidationEvent;
12
13 import org.xml.sax.SAXException;
14
15 /***
16 * Unified event handler that processes
17 * both the SAX events and error events.
18 *
19 * <p>
20 * This interface refines {@link ContentHandler} as follows:
21 * <ol>
22 * <li>element names and attribute names must be {@link String#intern()}ed.
23 * <li>namespace prefix and uris must be {@link String#intern()}ed.
24 * </ol>
25 */
26 public interface SAXUnmarshallerHandler extends UnmarshallerHandler {
27
28 /***
29 * Reports an error to the user, and asks if s/he wants
30 * to recover. If the canRecover flag is false, regardless
31 * of the client instruction, an exception will be thrown.
32 *
33 * Only if the flag is true and the user wants to recover from an error,
34 * the method returns normally.
35 *
36 * The thrown exception will be catched by the unmarshaller.
37 */
38 void handleEvent( ValidationEvent event, boolean canRecover ) throws SAXException;
39 }