public class TimerLifecycle extends Timer implements ILifecycle
Modifier and Type | Class and Description |
---|---|
static class |
TimerLifecycle.DaemonFactory |
ILifecycle.DeferrableActivation
Modifier and Type | Field and Description |
---|---|
static String |
PRODUCT_GROUP |
Constructor and Description |
---|
TimerLifecycle() |
TimerLifecycle(boolean isDaemon) |
TimerLifecycle(String name) |
TimerLifecycle(String name,
boolean isDaemon) |
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
addListener(IListener listener)
Adds a listener to this notifier.
|
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.
|
String |
toString() |
cancel, purge, schedule, schedule, schedule, schedule, scheduleAtFixedRate, scheduleAtFixedRate
public static final String PRODUCT_GROUP
public TimerLifecycle()
public TimerLifecycle(boolean isDaemon)
public TimerLifecycle(String name)
public TimerLifecycle(String name, boolean isDaemon)
public final LifecycleState getLifecycleState()
getLifecycleState
in interface ILifecycle
public final boolean isActive()
isActive
in interface ILifecycle
public void addListener(IListener listener)
INotifier
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,
addListener
in interface INotifier
public void removeListener(IListener listener)
INotifier
removeListener
in interface INotifier
public IListener[] getListeners()
INotifier
Depending on the implementation duplicate listeners may be contained in the returned array.
getListeners
in interface INotifier
public boolean hasListeners()
INotifier
true
if one or more listeners are registered with this notifier, false
otherwise.hasListeners
in interface INotifier
public final void activate() throws LifecycleException
activate
in interface ILifecycle
LifecycleException
public final Exception deactivate()
deactivate
in interface IDeactivateable
deactivate
in interface ILifecycle
Copyright (c) 2014 Eike Stepper (Berlin, 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