Class PrintStreamTaskMonitor
java.lang.Object
com.vividsolutions.jump.task.PrintStreamTaskMonitor
- All Implemented Interfaces:
TaskMonitor
A TaskMonitor that reports its output to a PrintStream.
User can control the level of output reported, as well as whether timing
information is logged as well.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidNotifies parties that the task will accept requests for cancellation (though the task is not obligated to cancel immediately, or at all for that matter).booleanChecks whether a party has requested that the task be cancelled.voidReports the number of items processed.voidReports an Exception that occurred.voidDescribes the status of the task.voidsetLoggingSubtasks(boolean isLoggingSubtasks)
-
Constructor Details
-
PrintStreamTaskMonitor
-
PrintStreamTaskMonitor
public PrintStreamTaskMonitor()
-
-
Method Details
-
setLoggingSubtasks
public void setLoggingSubtasks(boolean isLoggingSubtasks) -
report
Description copied from interface:TaskMonitorDescribes the status of the task.- Specified by:
reportin interfaceTaskMonitor- Parameters:
description- a description of the progress of the overall task
-
report
Description copied from interface:TaskMonitorReports an Exception that occurred. The task may choose to carry on.- Specified by:
reportin interfaceTaskMonitor- Parameters:
exception- an Exception that occurred during the execution of the task.
-
report
Description copied from interface:TaskMonitorReports the number of items processed.- Specified by:
reportin interfaceTaskMonitor- Parameters:
subtasksDone- the number of items that have been processedtotalSubtasks- the total number of items being processed, or -1 if the total number is not knownsubtaskDescription- a one-word description of the items, such as "features"
-
allowCancellationRequests
public void allowCancellationRequests()Description copied from interface:TaskMonitorNotifies 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:
allowCancellationRequestsin interfaceTaskMonitor
-
isCancelRequested
public boolean isCancelRequested()Description copied from interface:TaskMonitorChecks whether a party has requested that the task be cancelled. However, the task is not obligated to cancel immediately (or at all).- Specified by:
isCancelRequestedin interfaceTaskMonitor- Returns:
- whether a party has requested that the task be cancelled
-