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 ClassesNested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivationNested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2 -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTimerLifecycle(boolean isDaemon) TimerLifecycle(String name) TimerLifecycle(String name, boolean isDaemon) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidactivate()voidaddListener(IListener listener) Adds a listener to this notifier.voidcancel()final Exceptionfinal LifecycleStateReturns the listeners that are registered with this notifier.booleanReturnstrueif one or more listeners are registered with this notifier,falseotherwise.final booleanisActive()voidremoveListener(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:
getLifecycleStatein interfaceILifecycle- Since:
- 3.0
-
isActive
public final boolean isActive()- Specified by:
isActivein interfaceILifecycle
-
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
-
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
-
hasListeners
public boolean hasListeners()Description copied from interface:INotifierReturnstrueif one or more listeners are registered with this notifier,falseotherwise.- Specified by:
hasListenersin interfaceINotifier
-
activate
- Specified by:
activatein interfaceILifecycle- Throws:
LifecycleException
-
deactivate
- Specified by:
deactivatein interfaceIDeactivateable- Specified by:
deactivatein interfaceILifecycle
-
toString
-
cancel
public void cancel()
-