public abstract class LifecycleHelper
extends java.lang.Object
Constructor and Description |
---|
LifecycleHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
close(ComponentLifecycle... s)
Close the component.
|
static void |
init(ComponentLifecycle... s)
Initialise the component.
|
static <T extends ComponentLifecycle> |
initAndStart(T c)
Prepare initialise and start
|
static <T extends ComponentLifecycle> |
initAndStart(T c,
boolean logging) |
static void |
prepare(ComponentLifecycle... s)
Prepare the component if it can be.
|
static void |
registerEventHandler(AdaptrisComponent c,
EventHandler eh)
Register the event handler against a component that requires it.
|
static void |
start(ComponentLifecycle... s)
Start the component.
|
static void |
stop(ComponentLifecycle... s)
Stop the component.
|
static <T extends ComponentLifecycle> |
stopAndClose(T c)
Stop and Close.
|
static <T extends ComponentLifecycle> |
stopAndClose(T c,
boolean logging) |
static void |
waitQuietly(long ms) |
public static final void init(ComponentLifecycle... s) throws CoreException
s
- the componentCoreException
- from ComponentLifecycle.init()
or StateManagedComponent.requestInit()
ComponentLifecycle.init()
,
StateManagedComponent.requestInit()
public static final void start(ComponentLifecycle... s) throws CoreException
s
- the componentCoreException
- from ComponentLifecycle.start()
or StateManagedComponent.requestStart()
ComponentLifecycle.start()
,
StateManagedComponent.requestStart()
public static final void stop(ComponentLifecycle... s)
s
- the componentComponentLifecycle.stop()
,
StateManagedComponent.requestStop()
public static final void close(ComponentLifecycle... s)
s
- the componentComponentLifecycle.close()
,
StateManagedComponent.requestClose()
public static void registerEventHandler(AdaptrisComponent c, EventHandler eh)
c
- a service.eh
- the event handler.public static void prepare(ComponentLifecycle... s) throws CoreException
s
- a service.CoreException
public static <T extends ComponentLifecycle> T initAndStart(T c) throws CoreException
CoreException
public static <T extends ComponentLifecycle> T initAndStart(T c, boolean logging) throws CoreException
CoreException
public static <T extends ComponentLifecycle> T stopAndClose(T c)
public static <T extends ComponentLifecycle> T stopAndClose(T c, boolean logging)
public static void waitQuietly(long ms)