javax.xml.bind.helpers

Class DefaultValidationEventHandler

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.

Author:
JSR-31
Since:
JAXB1.0

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.

Constructor Details

DefaultValidationEventHandler

public DefaultValidationEventHandler()
Creates a new instance of DefaultValidationEventHandler.

Method Details

handleEvent

public boolean handleEvent(ValidationEvent event)
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:
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.