com.vividsolutions.jump.task
Class DummyTaskMonitor

java.lang.Object
  extended by com.vividsolutions.jump.task.DummyTaskMonitor
All Implemented Interfaces:
TaskMonitor
Direct Known Subclasses:
TaskMonitorFilter

public class DummyTaskMonitor
extends java.lang.Object
implements TaskMonitor

Implementation of TaskMonitor that does nothing. Can be used for Tasks that do not need to report on their status (for instance, tasks run only in batch mode).


Constructor Summary
DummyTaskMonitor()
           
 
Method Summary
 void allowCancellationRequests()
          Notifies parties that the task will accept requests for cancellation (though the task is not obligated to cancel immediately, or at all for that matter).
 boolean isCancelRequested()
          Checks whether a party has requested that the task be cancelled.
 void report(java.lang.Exception exception)
          Reports an Exception that occurred.
 void report(int subtasksDone, int totalSubtasks, java.lang.String subtaskDescription)
          Reports the number of items processed.
 void report(java.lang.String description)
          Describes the status of the task.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyTaskMonitor

public DummyTaskMonitor()
Method Detail

report

public void report(java.lang.String description)
Description copied from interface: TaskMonitor
Describes the status of the task.

Specified by:
report in interface TaskMonitor
Parameters:
description - a description of the progress of the overall task

report

public void report(int subtasksDone,
                   int totalSubtasks,
                   java.lang.String subtaskDescription)
Description copied from interface: TaskMonitor
Reports the number of items processed.

Specified by:
report in interface TaskMonitor
Parameters:
subtasksDone - the number of items that have been processed
totalSubtasks - the total number of items being processed, or -1 if the total number is not known
subtaskDescription - a one-word description of the items, such as "features"

allowCancellationRequests

public void allowCancellationRequests()
Description copied from interface: TaskMonitor
Notifies parties that the task will accept requests for cancellation (though the task is not obligated to cancel immediately, or at all for that matter).

Specified by:
allowCancellationRequests in interface TaskMonitor

isCancelRequested

public boolean isCancelRequested()
Description copied from interface: TaskMonitor
Checks whether a party has requested that the task be cancelled. However, the task is not obligated to cancel immediately (or at all).

Specified by:
isCancelRequested in interface TaskMonitor
Returns:
whether a party has requested that the task be cancelled

report

public void report(java.lang.Exception exception)
Description copied from interface: TaskMonitor
Reports an Exception that occurred. The task may choose to carry on.

Specified by:
report in interface TaskMonitor
Parameters:
exception - an Exception that occurred during the execution of the task.