Class NotifyingMonitor
- java.lang.Object
- 
- org.eclipse.net4j.util.om.monitor.AbstractMonitor
- 
- org.eclipse.net4j.util.om.monitor.Monitor
- 
- org.eclipse.net4j.util.om.monitor.NotifyingMonitor
 
 
 
- 
- All Implemented Interfaces:
- INotifier,- OMMonitor,- OMMonitorProgress
 
 public class NotifyingMonitor extends Monitor implements INotifier - Since:
- 3.1
- Author:
- Eike Stepper
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classNotifyingMonitor.ProgressEvent- 
Nested classes/interfaces inherited from class org.eclipse.net4j.util.om.monitor.AbstractMonitorAbstractMonitor.AsyncTimerTask
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifierINotifier.INotifier2
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitorOMMonitor.Async
 
- 
 - 
Field Summary- 
Fields inherited from class org.eclipse.net4j.util.om.monitor.MonitorDEFAULT_ASYNC_SCHEDULE_PERIOD
 - 
Fields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitorDEFAULT_TIME_FACTOR, THOUSAND
 - 
Fields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitorProgressHUNDRED, ONE, TEN, ZERO
 
- 
 - 
Constructor SummaryConstructors Constructor Description NotifyingMonitor()NotifyingMonitor(java.lang.String task)NotifyingMonitor(java.lang.String task, IListener[] listeners)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(IListener listener)Adds a listener to this notifier.IListener[]getListeners()Returns the listeners that are registered with this notifier.java.lang.StringgetTask()booleanhasListeners()Returnstrueif one or more listeners are registered with this notifier,falseotherwise.voidremoveListener(IListener listener)Removes a listener from this notifier.voidworked(double work)- 
Methods inherited from class org.eclipse.net4j.util.om.monitor.Monitorcancel, cancel, checkCanceled, getAsyncSchedulePeriod, getTimer, isCanceled, scheduleAtFixedRate
 - 
Methods inherited from class org.eclipse.net4j.util.om.monitor.AbstractMonitorbegin, begin, createAsyncTimerTask, createNestedMonitor, done, fork, fork, forkAsync, forkAsync, getTotalWork, getWork, getWorkPercent, hasBegun, percent, worked
 
- 
 
- 
- 
- 
Constructor Detail- 
NotifyingMonitorpublic NotifyingMonitor() 
 - 
NotifyingMonitorpublic NotifyingMonitor(java.lang.String task) 
 - 
NotifyingMonitorpublic NotifyingMonitor(java.lang.String task, IListener[] listeners)
 
- 
 - 
Method Detail- 
getTaskpublic java.lang.String getTask() 
 - 
hasListenerspublic boolean hasListeners() Description copied from interface:INotifierReturnstrueif one or more listeners are registered with this notifier,falseotherwise.- Specified by:
- hasListenersin interface- INotifier
 
 - 
getListenerspublic IListener[] getListeners() Description copied from interface:INotifierReturns the listeners that are registered with this notifier.Depending on the implementation duplicate listeners may be contained in the returned array. - Specified by:
- getListenersin interface- INotifier
 
 - 
addListenerpublic void addListener(IListener listener) Description copied from interface:INotifierAdds a listener to this notifier.Depending on the implementation duplicate listeners may lead to duplicate event delivery or not. Implementors are encouraged to prevent events from being delivered more than once to the same listener, - Specified by:
- addListenerin interface- INotifier
 
 - 
removeListenerpublic void removeListener(IListener listener) Description copied from interface:INotifierRemoves a listener from this notifier.- Specified by:
- removeListenerin interface- INotifier
 
 - 
workedpublic void worked(double work) throws MonitorCanceledException- Specified by:
- workedin interface- OMMonitor
- Overrides:
- workedin class- AbstractMonitor
- Throws:
- MonitorCanceledException
 
 
- 
 
-