public class NotifyingMonitor extends Monitor implements INotifier
| Modifier and Type | Class and Description |
|---|---|
static class |
NotifyingMonitor.ProgressEvent |
AbstractMonitor.AsyncTimerTaskOMMonitor.AsyncDEFAULT_ASYNC_SCHEDULE_PERIODDEFAULT_TIME_FACTOR, THOUSANDHUNDRED, ONE, TEN, ZERO| Constructor and Description |
|---|
NotifyingMonitor() |
NotifyingMonitor(java.lang.String task) |
NotifyingMonitor(java.lang.String task,
IListener[] listeners) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(IListener listener)
Adds a listener to this notifier.
|
IListener[] |
getListeners()
Returns the listeners that are registered with this notifier.
|
java.lang.String |
getTask() |
boolean |
hasListeners()
Returns
true if one or more listeners are registered with this notifier, false otherwise. |
void |
removeListener(IListener listener)
Removes a listener from this notifier.
|
void |
worked(double work) |
cancel, cancel, checkCanceled, getAsyncSchedulePeriod, getTimer, isCanceled, scheduleAtFixedRatebegin, begin, createAsyncTimerTask, createNestedMonitor, done, fork, fork, forkAsync, forkAsync, getTotalWork, getWork, getWorkPercent, hasBegun, percent, workedpublic NotifyingMonitor()
public NotifyingMonitor(java.lang.String task)
public NotifyingMonitor(java.lang.String task,
IListener[] listeners)
public java.lang.String getTask()
public boolean hasListeners()
INotifiertrue if one or more listeners are registered with this notifier, false otherwise.hasListeners in interface INotifierpublic IListener[] getListeners()
INotifierDepending on the implementation duplicate listeners may be contained in the returned array.
getListeners in interface INotifierpublic void addListener(IListener listener)
INotifierDepending 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,
addListener in interface INotifierpublic void removeListener(IListener listener)
INotifierremoveListener in interface INotifierpublic void worked(double work)
throws MonitorCanceledException
worked in interface OMMonitorworked in class AbstractMonitorMonitorCanceledExceptionCopyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html