diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/impl/tpt/timer/TimerFactory.java')
-rw-r--r-- | bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/impl/tpt/timer/TimerFactory.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/impl/tpt/timer/TimerFactory.java b/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/impl/tpt/timer/TimerFactory.java index dcd710aa0..96ca4a397 100644 --- a/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/impl/tpt/timer/TimerFactory.java +++ b/bundles/org.eclipse.equinox.util/src/org/eclipse/equinox/internal/util/impl/tpt/timer/TimerFactory.java @@ -23,7 +23,7 @@ import org.eclipse.equinox.internal.util.timer.TimerListener; * @version 1.0 */ -public class TimerFactory extends ServiceFactoryImpl implements Timer { +public class TimerFactory extends ServiceFactoryImpl<Timer> implements Timer { private static TimerImpl timer; public TimerFactory(String bundleName, ThreadPoolFactoryImpl factory, Log log) { @@ -36,32 +36,38 @@ public class TimerFactory extends ServiceFactoryImpl implements Timer { super(bundleName); } - public Object getInstance(String bundleName) { + @Override + public Timer getInstance(String bundleName) { if (timer == null) throw new RuntimeException("ServiceFactory is currently off!"); return new TimerFactory(bundleName); } + @Override @Deprecated public void notifyAfterMillis(TimerListener listener, long timePeriod, int event) throws IllegalArgumentException { addNotifyListener(listener, Thread.NORM_PRIORITY, Timer.ONE_SHOT_TIMER, timePeriod, event); } + @Override @Deprecated public void notifyAfterMillis(TimerListener listener, int priority, long timePeriod, int event) throws IllegalArgumentException { addNotifyListener(listener, priority, Timer.ONE_SHOT_TIMER, timePeriod, event); } + @Override @Deprecated public void notifyAfter(TimerListener listener, int timePeriod, int event) throws IllegalArgumentException { addNotifyListener(listener, Thread.NORM_PRIORITY, Timer.ONE_SHOT_TIMER, timePeriod * 1000, event); } + @Override @Deprecated public void notifyAfter(TimerListener listener, int priority, int timePeriod, int event) throws IllegalArgumentException { addNotifyListener(listener, priority, Timer.ONE_SHOT_TIMER, timePeriod * 1000, event); } + @Override public void addNotifyListener(TimerListener listener, int priority, int timerType, long periodMilis, int event) { TimerImpl tmp = timer; if (tmp == null) @@ -76,6 +82,7 @@ public class TimerFactory extends ServiceFactoryImpl implements Timer { } } + @Override public void removeListener(TimerListener listener, int event) { TimerImpl tmp = timer; if (tmp == null) |