Details
Description
A new ProgressListener interface has been added:
Some points may need revision:
- Copyright header need to be changed to OGC one.
- We should remove deprecated methods (this interface don't have to be compatible with the Geotools one).
- Should we rename getTask() as getDescription() (since we remove the old deprecated getDescription())?
- isCanceled() and setCanceled(boolean): should we really keep those methods in a listener interface?
- warningOccurred(...): some String arguments should probably be replaced by InternationalString.
Proposal for isCanceled() replacement: a processAborted() method to be invoked like any other listener methods when the process is aborted. This is similar to IIOReadProgressListener interface in J2SE 1.4.
Proposal for setCanceled(boolean) replacement: a new interface (Processor or something like that) which contains an abort() method. This Processor would be added as the first argument to every ProgressListener interface. This idea is almost a "copy-and-paste" from J2SE IIOReadProgressListener interface, which receive a ImageReader as the first argument for every methods. The abort() method lives in ImageReader, not in the listener.
Note that the getTask() / setTask(...) method could also live in Processor, which may be a more appropriate place.
Actually ProgressListener is not referenced anywhere in the GeoAPI project. We could remove it and let library implementors define their own interface.