javax.xml.bind.helpers
Class DefaultValidationEventHandler

java.lang.Object
  extended by javax.xml.bind.helpers.DefaultValidationEventHandler
All Implemented Interfaces:
ValidationEventHandler

public class DefaultValidationEventHandler
extends java.lang.Object
implements ValidationEventHandler

Default implementation of a ValidationEventHandler. Causes the validation to fail as soon as the first error or fatal error is encountered.

This instance of ValidationEventHandler is suitable for use of the unmarshallers or validators default event handler.

Since:
JAXB1.0
Author:
JSR-31

Constructor Summary
DefaultValidationEventHandler()
          Creates a new instance of DefaultValidationEventHandler.
 
Method Summary
 boolean handleEvent(ValidationEvent event)
          The handleEvent method is invoked by the JAXB provider, if a problem was found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultValidationEventHandler

public DefaultValidationEventHandler()

Creates a new instance of DefaultValidationEventHandler.

Method Detail

handleEvent

public boolean handleEvent(ValidationEvent event)
Description copied from interface: ValidationEventHandler

The handleEvent method is invoked by the JAXB provider, if a problem was found. The events ValidationEventLocator may be used to locate the source of the problem.

Specified by:
handleEvent in interface ValidationEventHandler
Parameters:
event - 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.