public interface ILifecycleComponent
Modifier and Type | Method and Description |
---|---|
boolean |
canPause()
Indicates to framework whether component can be paused.
|
java.util.List<ILifecycleComponent> |
findComponentsOfType(LifecycleComponentType type)
Find components (including this component and nested components) that are
of the given type.
|
java.lang.String |
getComponentId()
Get the unique component id.
|
java.lang.String |
getComponentName()
Get human-readable name shown for component.
|
LifecycleComponentType |
getComponentType()
Get component type.
|
java.util.Date |
getCreatedDate()
Get date the component was created.
|
java.util.Map<java.lang.String,ILifecycleComponent> |
getLifecycleComponents()
Get map of contained
ILifecycleComponent elements by unique id. |
SiteWhereException |
getLifecycleError()
Gets the last lifecycle error that occurred.
|
LifecycleStatus |
getLifecycleStatus()
Get current lifecycle status.
|
org.apache.logging.log4j.Logger |
getLogger()
Get component logger.
|
void |
initialize(ILifecycleProgressMonitor monitor)
Initialize the component.
|
void |
initializeNestedComponent(ILifecycleComponent component,
ILifecycleProgressMonitor monitor)
Initialize a nested component.
|
void |
lifecycleInitialize(ILifecycleProgressMonitor monitor)
Initializes the component while keeping up with lifeycle information.
|
void |
lifecyclePause(ILifecycleProgressMonitor monitor)
Pauses the component while keeping up with lifecycle information.
|
void |
lifecycleStart(ILifecycleProgressMonitor monitor)
Starts the component while keeping up with lifecycle information.
|
void |
lifecycleStop(ILifecycleProgressMonitor monitor)
Stops the component while keeping up with lifecycle information.
|
void |
lifecycleStop(ILifecycleProgressMonitor monitor,
ILifecycleConstraints constraints)
Stops the component while keeping up with lifecycle information.
|
void |
logState()
Logs the state of this component and all nested components.
|
void |
pause(ILifecycleProgressMonitor monitor)
Pause the component.
|
void |
start(ILifecycleProgressMonitor monitor)
Start the component.
|
void |
startNestedComponent(ILifecycleComponent component,
ILifecycleProgressMonitor monitor,
java.lang.String errorMessage,
boolean require)
Start component as a nested lifecycle component.
|
void |
stop(ILifecycleProgressMonitor monitor)
Stop the component.
|
void |
stop(ILifecycleProgressMonitor monitor,
ILifecycleConstraints constraints)
Stop the component.
|
java.lang.String getComponentId()
java.lang.String getComponentName()
LifecycleComponentType getComponentType()
LifecycleStatus getLifecycleStatus()
SiteWhereException getLifecycleError()
java.util.Map<java.lang.String,ILifecycleComponent> getLifecycleComponents()
ILifecycleComponent
elements by unique id.void lifecycleInitialize(ILifecycleProgressMonitor monitor)
monitor
- void initialize(ILifecycleProgressMonitor monitor) throws SiteWhereException
monitor
- SiteWhereException
void initializeNestedComponent(ILifecycleComponent component, ILifecycleProgressMonitor monitor) throws SiteWhereException
component
- monitor
- SiteWhereException
void lifecycleStart(ILifecycleProgressMonitor monitor)
void start(ILifecycleProgressMonitor monitor) throws SiteWhereException
SiteWhereException
void startNestedComponent(ILifecycleComponent component, ILifecycleProgressMonitor monitor, java.lang.String errorMessage, boolean require) throws SiteWhereException
component
- monitor
- errorMessage
- require
- SiteWhereException
void lifecyclePause(ILifecycleProgressMonitor monitor)
boolean canPause() throws SiteWhereException
SiteWhereException
void pause(ILifecycleProgressMonitor monitor) throws SiteWhereException
SiteWhereException
void lifecycleStop(ILifecycleProgressMonitor monitor)
monitor
- void lifecycleStop(ILifecycleProgressMonitor monitor, ILifecycleConstraints constraints)
monitor
- constraints
- void stop(ILifecycleProgressMonitor monitor) throws SiteWhereException
SiteWhereException
void stop(ILifecycleProgressMonitor monitor, ILifecycleConstraints constraints) throws SiteWhereException
SiteWhereException
java.util.List<ILifecycleComponent> findComponentsOfType(LifecycleComponentType type) throws SiteWhereException
type
- SiteWhereException
java.util.Date getCreatedDate()
org.apache.logging.log4j.Logger getLogger()
void logState()