public interface Converter<S,T>
| 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 converter. |
void |
convert(S source,
T target)
Converts source objects into target objects.
|
void |
convert(S source,
T target,
ExecutorService service)
Perform validation of the supplied validator source, delegating all work to the supplied Executor Service to
enable validation in parallel.
|
Collection<ErrorItemListener> |
getErrorItemListeners()
Get the collection of
ErrorItemListeners registered to this
parser |
Collection<ProgressListener> |
getProgressListeners()
Get the collection of
ProgressListeners that are currently registered to this converter. |
void |
removeErrorItemListener(ErrorItemListener listener)
Deregister an
ErrorItemListener with this parser. |
void |
removeProgressListener(ProgressListener listener)
Deregister a
ProgressListener from this converter. |
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 registerCollection<ErrorItemListener> getErrorItemListeners()
ErrorItemListeners registered to this
parservoid addProgressListener(ProgressListener listener)
ProgressListener with this converter. Whenever the converter has more progress to report, this
listener will be notified.listener - the listener to registervoid removeProgressListener(ProgressListener listener)
ProgressListener from this converter. Progress events will no longer be reported through this
converterlistener - a listener to monitor progress of the parsing operationCollection<ProgressListener> getProgressListeners()
ProgressListeners that are currently registered to this converter.void convert(S source, T target) throws ConversionException
source - the source objects to converttarget - the resulting target objectsConversionException - if the sourcevoid convert(S source, T target, ExecutorService service) throws ConversionException, InterruptedException
source - the datamodel objects to convert fromtarget - the type of object data is being converted intoservice - the service to use to execute conversion tasksConversionException - if the supplied source could not be convertedInterruptedException - if execution of a task sent to the Executor Service was interrruptedCopyright © 2014. All rights reserved.