Interface ProgressListener


public interface ProgressListener
A listener for events on the progress service, including updates to task progress
  • Method Details

    • monitorCreated

      void monitorCreated(MonitorReceiver monitor)
      A new task monitor has been created

      The subscriber ought to display the monitor as soon as is reasonable. Optionally, a subscriber may apply a grace period, e.g., half a second, before displaying it, in case it is quickly disposed.

      Parameters:
      monitor - a means of retrieving messages and progress about the task
    • monitorDisposed

      void monitorDisposed(MonitorReceiver monitor, ProgressListener.Disposal disposal)
      A task monitor has been disposed
      Parameters:
      monitor - the receiver for the disposed monitor
      disposal - why it was disposed
    • messageUpdated

      void messageUpdated(MonitorReceiver monitor, String message)
      A task has updated a monitor's message
      Parameters:
      monitor - the receiver whose monitor's message changed
      message - the new message
    • errorReported

      void errorReported(MonitorReceiver monitor, Throwable error)
      A task has reported an error
      Parameters:
      monitor - the receiver for the task reporting the error
      error - the exception representing the error
    • progressUpdated

      void progressUpdated(MonitorReceiver monitor, long progress)
      A task's progress has updated

      Note the subscriber may need to use MonitorReceiver.getMaximum() to properly update the display.

      Parameters:
      monitor - the receiver whose monitor's progress changed
      progress - the new progress value
    • attributeUpdated

      void attributeUpdated(MonitorReceiver monitor)
      Some other attribute has been updated
      • cancelled
      • cancel enabled
      • indeterminate
      • maximum
      • show progress value in percent string
      Parameters:
      monitor - the receiver whose monitor's attribute(s) changed