Class NestedMonitor
- java.lang.Object
-
- org.eclipse.net4j.util.om.monitor.AbstractMonitor
-
- org.eclipse.net4j.util.om.monitor.NestedMonitor
-
- All Implemented Interfaces:
OMMonitor
,OMMonitorProgress
public class NestedMonitor extends AbstractMonitor
- Since:
- 2.0
- Author:
- Eike Stepper
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.net4j.util.om.monitor.AbstractMonitor
AbstractMonitor.AsyncTimerTask
-
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor
OMMonitor.Async
-
-
Field Summary
-
Fields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor
DEFAULT_TIME_FACTOR, THOUSAND
-
Fields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitorProgress
HUNDRED, ONE, TEN, ZERO
-
-
Constructor Summary
Constructors Constructor Description NestedMonitor(AbstractMonitor parent, double parentWork)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OMMonitor
begin(double totalWork)
void
checkCanceled()
void
done()
protected long
getAsyncSchedulePeriod()
AbstractMonitor
getParent()
double
getParentWork()
protected java.util.Timer
getTimer()
boolean
isCanceled()
protected void
scheduleAtFixedRate(java.util.TimerTask task, long delay, long period)
void
worked(double work)
-
Methods inherited from class org.eclipse.net4j.util.om.monitor.AbstractMonitor
begin, createAsyncTimerTask, createNestedMonitor, fork, fork, forkAsync, forkAsync, getTotalWork, getWork, getWorkPercent, hasBegun, percent, worked
-
-
-
-
Constructor Detail
-
NestedMonitor
public NestedMonitor(AbstractMonitor parent, double parentWork)
-
-
Method Detail
-
getParent
public AbstractMonitor getParent()
-
getParentWork
public double getParentWork()
-
isCanceled
public boolean isCanceled()
-
checkCanceled
public void checkCanceled() throws MonitorCanceledException
- Throws:
MonitorCanceledException
-
begin
public OMMonitor begin(double totalWork) throws MonitorCanceledException
- Specified by:
begin
in interfaceOMMonitor
- Overrides:
begin
in classAbstractMonitor
- Throws:
MonitorCanceledException
-
worked
public void worked(double work) throws MonitorCanceledException
- Specified by:
worked
in interfaceOMMonitor
- Overrides:
worked
in classAbstractMonitor
- Throws:
MonitorCanceledException
-
done
public void done()
- Specified by:
done
in interfaceOMMonitor
- Overrides:
done
in classAbstractMonitor
-
getAsyncSchedulePeriod
protected long getAsyncSchedulePeriod()
- Specified by:
getAsyncSchedulePeriod
in classAbstractMonitor
-
scheduleAtFixedRate
protected void scheduleAtFixedRate(java.util.TimerTask task, long delay, long period)
- Specified by:
scheduleAtFixedRate
in classAbstractMonitor
-
getTimer
protected java.util.Timer getTimer()
- Specified by:
getTimer
in classAbstractMonitor
-
-