|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.dna.common.monitor.ProgressMonitorWrapper
public class ProgressMonitorWrapper
The thread safety of this class is determined by the delegate.
Constructor Summary | |
---|---|
ProgressMonitorWrapper(ProgressMonitor delegate)
|
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. |
ProgressMonitor |
createSubtask(double subtaskWork)
Called by the Updater to create a subtask with the given about of work. |
void |
done()
Called by the Updater to mark this activity as complete. |
String |
getActivityName()
Get the name of the activity. |
Problems |
getProblems()
Return the problems encountered during the progress made towards completing the associated
activity .
|
ProgressStatus |
getStatus(Locale locale)
Return the current status of this activity, localized to the specified locale. |
ProgressMonitor |
getWrappedMonitor()
|
boolean |
isCancelled()
Return whether a request was made by an Observer to cancel this activity. |
boolean |
isDone()
Return whether this activity has completed. |
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProgressMonitorWrapper(ProgressMonitor delegate)
Method Detail |
---|
public ProgressMonitor getWrappedMonitor()
public void beginTask(double totalWork, I18n name, Object... params)
ProgressMonitor
beginTask
in interface ProgressMonitor
totalWork
- the total number of work units for the taskname
- the name of the taskparams
- the parameters for localizationpublic ProgressMonitor createSubtask(double subtaskWork)
ProgressMonitor
ProgressMonitor.beginTask(double, I18n, Object...)
) and finished (ProgressMonitor.done()
).
createSubtask
in interface ProgressMonitor
subtaskWork
- the number of work units for this subtask
public void done()
ProgressMonitor
done
in interface ProgressMonitor
public String getActivityName()
ProgressMonitor
subtasks
should have the same name.
getActivityName
in interface ProgressMonitor
public ProgressStatus getStatus(Locale locale)
ProgressMonitor
subtask
,
this method returns the status of the subtask.
getStatus
in interface ProgressMonitor
locale
- the locale in which the status is to be represented; if null, the default locale
will be used
public Problems getProblems()
Return the problems encountered during the progress
made towards completing the associated
activity
.
getProblems
in interface ProgressMonitor
ProgressMonitor.getProblems()
public boolean isCancelled()
ProgressMonitor
cancel
this activity.
isCancelled
in interface ProgressMonitor
true
if this activity has been requested to be cancelled.public boolean isDone()
isDone
in interface ProgressMonitor
true
if this activity has completed.ProgressMonitor.isDone()
public void setCancelled(boolean value)
ProgressMonitor
completes
before the Updater
recognizes a cancellation request by an Observer).
setCancelled
in interface ProgressMonitor
value
- true
if requesting the activity be cancelled.public void worked(double work)
ProgressMonitor
worked
in interface ProgressMonitor
work
- the number of work units that have been worked
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |