Class TimerLifecycle
java.lang.Object
java.util.Timer
org.eclipse.net4j.util.concurrent.TimerLifecycle
- All Implemented Interfaces:
INotifier
,IDeactivateable
,ILifecycle
- Since:
- 2.0
- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivation
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTimerLifecycle
(boolean isDaemon) TimerLifecycle
(String name) TimerLifecycle
(String name, boolean isDaemon) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
activate()
void
addListener
(IListener listener) Adds a listener to this notifier.void
cancel()
final Exception
final LifecycleState
Returns the listeners that are registered with this notifier.boolean
Returnstrue
if one or more listeners are registered with this notifier,false
otherwise.final boolean
isActive()
void
removeListener
(IListener listener) Removes a listener from this notifier.toString()
Methods inherited from class java.util.Timer
purge, schedule, schedule, schedule, schedule, scheduleAtFixedRate, scheduleAtFixedRate
-
Field Details
-
PRODUCT_GROUP
- See Also:
-
-
Constructor Details
-
TimerLifecycle
public TimerLifecycle() -
TimerLifecycle
public TimerLifecycle(boolean isDaemon) -
TimerLifecycle
-
TimerLifecycle
-
-
Method Details
-
getLifecycleState
- Specified by:
getLifecycleState
in interfaceILifecycle
- Since:
- 3.0
-
isActive
public final boolean isActive()- Specified by:
isActive
in interfaceILifecycle
-
addListener
Description copied from interface:INotifier
Adds 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:
addListener
in interfaceINotifier
-
removeListener
Description copied from interface:INotifier
Removes a listener from this notifier.- Specified by:
removeListener
in interfaceINotifier
-
getListeners
Description copied from interface:INotifier
Returns the listeners that are registered with this notifier.Depending on the implementation duplicate listeners may be contained in the returned array.
- Specified by:
getListeners
in interfaceINotifier
-
hasListeners
public boolean hasListeners()Description copied from interface:INotifier
Returnstrue
if one or more listeners are registered with this notifier,false
otherwise.- Specified by:
hasListeners
in interfaceINotifier
-
activate
- Specified by:
activate
in interfaceILifecycle
- Throws:
LifecycleException
-
deactivate
- Specified by:
deactivate
in interfaceIDeactivateable
- Specified by:
deactivate
in interfaceILifecycle
-
toString
-
cancel
public void cancel()
-