public interface Validator<T>
Parser. Implementations of this class should be typed by the types of object
 they validate.| Modifier and Type | Method and Description | 
|---|---|
void | 
addErrorItemListener(ErrorItemListener listener)
Register an  
ErrorItemListener with this parser. | 
void | 
addProgressListener(ProgressListener listener)
Register a  
ProgressListener with this validator. | 
Set<ErrorItemListener> | 
getErrorItemListeners()
Get the current set of  
ErrorItemListeners registered to this
 validator | 
Collection<ProgressListener> | 
getProgressListeners()
Get the collection of  
ProgressListeners that are currently registered to this validator. | 
void | 
removeErrorItemListener(ErrorItemListener listener)
Deregister an  
ErrorItemListener with this parser. | 
void | 
removeProgressListener(ProgressListener listener)
Deregister a  
ProgressListener from this validator. | 
void | 
validate(T validatorSource)
Perform validation of the supplied validator source. 
 | 
void | 
validate(T validatorSource,
        ExecutorService service)
Perform validation of the supplied validator source, delegating all work to the supplied Executor Service to
 enable validation in parallel. 
 | 
void addErrorItemListener(ErrorItemListener listener)
ErrorItemListener with this parser.  Whenever an error is encountered when parsing from the a
 parserSource, this listener should be notified.listener - the listener to registervoid removeErrorItemListener(ErrorItemListener listener)
ErrorItemListener with this parser.  This listener will no longer be notified when error
 items are generated.listener - the listener to registerSet<ErrorItemListener> getErrorItemListeners()
ErrorItemListeners registered to this
 validatorvoid addProgressListener(ProgressListener listener)
ProgressListener with this validator.  Whenever the validator has more progress to report, this
 listener will be notified.listener - the listener to registervoid removeProgressListener(ProgressListener listener)
ProgressListener from this validator.  Progress events will no longer be reported through this
 validatorlistener - a listener to monitor progress of the parsing operationCollection<ProgressListener> getProgressListeners()
ProgressListeners that are currently registered to this validator.void validate(T validatorSource) throws ValidateException
validatorSource - the generically typed datamodel object to validateValidateException - if the supplied source could not be validatedvoid validate(T validatorSource, ExecutorService service) throws ValidateException, InterruptedException
validatorSource - the datamodel objects to validateservice - the service to use to execute validation tasksValidateException - if the supplied source could not be validatedInterruptedException - if execution of a task sent to the Executor Service was interrruptedCopyright © 2014. All rights reserved.