org.jboss.dna.common.monitor
Class LoggingProgressMonitor
java.lang.Object
org.jboss.dna.common.monitor.ProgressMonitorWrapper
org.jboss.dna.common.monitor.LoggingProgressMonitor
- All Implemented Interfaces:
- ProgressMonitor
public class LoggingProgressMonitor
- extends ProgressMonitorWrapper
- Author:
- Randall Hauch
Method Summary |
void |
beginTask(double totalWork,
I18n name,
Object... params)
Called by the Updater to indicate work has started on the task, specifying the total amount of work that
this task constitutes. |
void |
done()
Called by the Updater to mark this activity as complete. |
void |
setCancelled(boolean value)
Called by an Observer to request the cancellation of this activity, or by the Updater
to deny a prior cancellation request (i.e., when the activity completes before the Updater
recognizes a cancellation request by an Observer). |
void |
worked(double work)
Called by the Updater to report work completed for this task. |
LoggingProgressMonitor
public LoggingProgressMonitor(ProgressMonitor delegate,
Logger logger,
Logger.Level level)
LoggingProgressMonitor
public LoggingProgressMonitor(ProgressMonitor delegate,
Logger logger,
Logger.Level level,
Locale locale)
beginTask
public void beginTask(double totalWork,
I18n name,
Object... params)
- Called by the Updater to indicate work has started on the task, specifying the total amount of work that
this task constitutes.
- Specified by:
beginTask
in interface ProgressMonitor
- Overrides:
beginTask
in class ProgressMonitorWrapper
- Parameters:
totalWork
- the total number of work units for the taskname
- the name of the taskparams
- the parameters for localization
done
public void done()
- Called by the Updater to mark this activity as complete. This method must be called, even if the activity
has been cancelled.
- Specified by:
done
in interface ProgressMonitor
- Overrides:
done
in class ProgressMonitorWrapper
setCancelled
public void setCancelled(boolean value)
- Called by an Observer to request the cancellation of this activity, or by the Updater
to deny a prior cancellation request (i.e., when the activity
completes
before the Updater
recognizes a cancellation request by an Observer).
- Specified by:
setCancelled
in interface ProgressMonitor
- Overrides:
setCancelled
in class ProgressMonitorWrapper
- Parameters:
value
- true
if requesting the activity be cancelled.
worked
public void worked(double work)
- Called by the Updater to report work completed for this task.
- Specified by:
worked
in interface ProgressMonitor
- Overrides:
worked
in class ProgressMonitorWrapper
- Parameters:
work
- the number of work units that have been worked
Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.