public abstract class AbstractLifecycle extends Object implements Lifecycle
Lifecycle. Provides a convenient base
implementation including correct thread safety, exception handling and check
for accidental unnecessary re-start & stop. Subclasses must implement
start() & stop().| Constructor and Description |
|---|
AbstractLifecycle() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Please implement
stop() instead of overriding this (here intentionally final) method. |
void |
init()
Please implement
start() instead of overriding this (here intentionally final) method. |
boolean |
isRunning() |
protected abstract void |
start() |
protected abstract void |
stop() |
@PostConstruct public final void init() throws ModuleSetupRuntimeException
start() instead of overriding this (here intentionally final) method.init in interface LifecycleModuleSetupRuntimeException - if initialization failed@PreDestroy public final void destroy() throws ModuleSetupRuntimeException
stop() instead of overriding this (here intentionally final) method.destroy in interface LifecycleModuleSetupRuntimeException - if destruction failedCopyright © 2019 OpenDaylight. All rights reserved.