public class TimerLifecycle extends java.util.Timer implements ILifecycle
| Modifier and Type | Class and Description |
|---|---|
static class |
TimerLifecycle.DaemonFactory |
ILifecycle.DeferrableActivation| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PRODUCT_GROUP |
| Constructor and Description |
|---|
TimerLifecycle() |
TimerLifecycle(boolean isDaemon) |
TimerLifecycle(java.lang.String name) |
TimerLifecycle(java.lang.String name,
boolean isDaemon) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addListener(IListener listener)
Adds a listener to this notifier.
|
java.lang.Exception |
deactivate() |
LifecycleState |
getLifecycleState() |
IListener[] |
getListeners()
Returns the listeners that are registered with this notifier.
|
boolean |
hasListeners()
Returns
true if one or more listeners are registered with this notifier, false otherwise. |
boolean |
isActive() |
void |
removeListener(IListener listener)
Removes a listener from this notifier.
|
java.lang.String |
toString() |
public static final java.lang.String PRODUCT_GROUP
public TimerLifecycle()
public TimerLifecycle(boolean isDaemon)
public TimerLifecycle(java.lang.String name)
public TimerLifecycle(java.lang.String name,
boolean isDaemon)
public final LifecycleState getLifecycleState()
getLifecycleState in interface ILifecyclepublic final boolean isActive()
isActive in interface ILifecyclepublic 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 IListener[] getListeners()
INotifierDepending on the implementation duplicate listeners may be contained in the returned array.
getListeners in interface INotifierpublic boolean hasListeners()
INotifiertrue if one or more listeners are registered with this notifier, false otherwise.hasListeners in interface INotifierpublic final void activate()
throws LifecycleException
activate in interface ILifecycleLifecycleExceptionpublic final java.lang.Exception deactivate()
deactivate in interface IDeactivateabledeactivate in interface ILifecyclepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright (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