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
- Since:
- 3.1
- Author:
- Eike Stepper
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.eclipse.net4j.util.om.monitor.AbstractMonitor
AbstractMonitor.AsyncTimerTaskNested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2Nested classes/interfaces inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor
OMMonitor.Async, OMMonitor.AsyncMonitor -
Field Summary
Fields inherited from class org.eclipse.net4j.util.om.monitor.Monitor
DEFAULT_ASYNC_SCHEDULE_PERIODFields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor
DEFAULT_TIME_FACTOR, THOUSANDFields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitorProgress
HUNDRED, ONE, TEN, ZERO -
Constructor Summary
ConstructorsConstructorDescriptionNotifyingMonitor(String task) NotifyingMonitor(String task, IListener[] listeners) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(IListener listener) Adds a listener to this notifier.Returns the listeners that are registered with this notifier.getTask()booleanReturnstrueif 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.Monitor
cancel, cancel, checkCanceled, getAsyncSchedulePeriod, getTimer, isCanceled, scheduleAtFixedRateMethods inherited from class org.eclipse.net4j.util.om.monitor.AbstractMonitor
begin, begin, createAsyncTimerTask, createNestedMonitor, done, fork, fork, forkAsync, forkAsync, getTotalWork, getWork, getWorkPercent, hasBegun, percent, worked
-
Constructor Details
-
NotifyingMonitor
public NotifyingMonitor() -
NotifyingMonitor
-
NotifyingMonitor
-
-
Method Details
-
getTask
-
hasListeners
public boolean hasListeners()Description copied from interface:INotifierReturnstrueif one or more listeners are registered with this notifier,falseotherwise.- Specified by:
hasListenersin interfaceINotifier
-
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 interfaceINotifier
-
addListener
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 interfaceINotifier
-
removeListener
Description copied from interface:INotifierRemoves a listener from this notifier.- Specified by:
removeListenerin interfaceINotifier
-
worked
- Specified by:
workedin interfaceOMMonitor- Overrides:
workedin classAbstractMonitor- Throws:
MonitorCanceledException
-