GeoAPI

New ProgressListener interface

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 3.0.0
  • Fix Version/s: 3.1.0
  • Component/s: util
  • Labels:
    None
  • Number of attachments :
    0

Description

A new ProgressListener interface has been added:

https://svn.sourceforge.net/svnroot/geoapi/trunk/geoapi/src/main/java/org/opengis/util/ProgressListener.java

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.

Activity

Hide
Martin Desruisseaux added a comment -

Actually ProgressListener is not referenced anywhere in the GeoAPI project. We could remove it and let library implementors define their own interface.

Show
Martin Desruisseaux added a comment - Actually ProgressListener is not referenced anywhere in the GeoAPI project. We could remove it and let library implementors define their own interface.
Hide
Martin Desruisseaux added a comment -

This interface has been deprecated. It will be removed later.

Show
Martin Desruisseaux added a comment - This interface has been deprecated. It will be removed later.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: