javax.xml.bind
public interface ValidationEventHandler
An instance of ValidationEventHandler
allows
to customize the reply to instances of
{@link javax.xml.bind.ValidationEvent}. By default, there is
a standard ValidationEventHandler
, converting
errors and fatal errors in Exceptions.
The JAXB user creates instances of ValidationEventHandler
and registers them with the {@link Marshaller}, {@link Unmarshaller},
or {@link Validator}. The JAXB provider is required not to throw
exceptions directly, but to convert all detected problems into events,
which are fired on the ValidationEventHandler
.
Since: JAXB1.0
See Also: Marshaller Unmarshaller ValidationEvent
Method Summary | |
---|---|
boolean | handleEvent(ValidationEvent pEvent) The |
The handleEvent
method is invoked by the
JAXB provider, if a problem was found. The events
{@link javax.xml.bind.ValidationEventLocator} may be
used to locate the source of the problem.
Parameters: pEvent The event being reported to the JAXB user.
Returns: True as an indicator that the JAXB provider should attempt to continue its current operation. (Marshalling, Unmarshalling, Validating) This will not always work. In particular, you cannot expect that the operation continues, if a fatal error was reported. False to indicate that the JAXB provider should terminate the operation and through an appropriate exception.
Throws: IllegalArgumentException The parameter is null.