public abstract class ComponentBase extends java.lang.Object implements AgentContextAware
AgentContextAware
components, such as handlers & controllers.Constructor and Description |
---|
ComponentBase(java.lang.String handlerIdentifier) |
Modifier and Type | Method and Description |
---|---|
protected AgentContext |
getAgentContext() |
protected AgentUpdateHandler |
getAgentUpdateHandler() |
protected ConfigurationHandler |
getConfigurationHandler() |
protected ConnectionHandler |
getConnectionHandler() |
protected DeploymentHandler |
getDeploymentHandler() |
protected DiscoveryHandler |
getDiscoveryHandler() |
protected DownloadHandler |
getDownloadHandler() |
protected EventsHandler |
getEventsHandler() |
protected java.util.concurrent.ScheduledExecutorService |
getExecutorService() |
protected FeedbackHandler |
getFeedbackHandler() |
protected IdentificationHandler |
getIdentificationHandler() |
protected LoggingHandler |
getLoggingHandler() |
protected java.io.File |
getWorkDir() |
void |
init(AgentContext agentContext)
Called when the agent context is initializing, and is called before
AgentContextAware.start(AgentContext) . |
protected void |
logDebug(java.lang.String message,
java.lang.Object... args) |
protected void |
logDebug(java.lang.String message,
java.lang.Throwable cause,
java.lang.Object... args) |
protected void |
logError(java.lang.String message,
java.lang.Object... args) |
protected void |
logError(java.lang.String message,
java.lang.Throwable cause,
java.lang.Object... args) |
protected void |
logInfo(java.lang.String message,
java.lang.Object... args) |
protected void |
logInfo(java.lang.String message,
java.lang.Throwable cause,
java.lang.Object... args) |
protected void |
logWarning(java.lang.String message,
java.lang.Object... args) |
protected void |
logWarning(java.lang.String message,
java.lang.Throwable cause,
java.lang.Object... args) |
protected void |
onInit() |
protected void |
onStart() |
protected void |
onStop() |
void |
start(AgentContext agentContext)
Called when the agent context is started.
|
void |
stop()
Called when the agent context is stopped.
|
public final void init(AgentContext agentContext) throws java.lang.Exception
AgentContextAware
AgentContextAware.start(AgentContext)
.
Use this method to register event listeners and/or perform other forms of initialization related tasks that need
to be done prior to AgentContextAware.start(AgentContext)
being called.
init
in interface AgentContextAware
agentContext
- the agent context that is initializing, never null
.java.lang.Exception
- if the component fails to initialize, which is logged and ignored by the agent.public final void start(AgentContext agentContext) throws java.lang.Exception
AgentContextAware
start
in interface AgentContextAware
agentContext
- the agent context that is started, never null
.java.lang.Exception
- if the component fails to start, which is logged and ignored by the agent.public final void stop() throws java.lang.Exception
AgentContextAware
stop
in interface AgentContextAware
java.lang.Exception
- if the component fails to stop, which is logged and ignored by the agent.protected final AgentContext getAgentContext()
protected void onInit() throws java.lang.Exception
java.lang.Exception
protected void onStart() throws java.lang.Exception
java.lang.Exception
protected void onStop() throws java.lang.Exception
java.lang.Exception
protected final IdentificationHandler getIdentificationHandler()
protected final DiscoveryHandler getDiscoveryHandler()
protected final ConnectionHandler getConnectionHandler()
protected final DeploymentHandler getDeploymentHandler()
protected final DownloadHandler getDownloadHandler()
protected final ConfigurationHandler getConfigurationHandler()
protected final AgentUpdateHandler getAgentUpdateHandler()
protected final FeedbackHandler getFeedbackHandler()
protected final LoggingHandler getLoggingHandler()
protected final EventsHandler getEventsHandler()
protected final java.util.concurrent.ScheduledExecutorService getExecutorService()
protected final java.io.File getWorkDir()
protected final void logDebug(java.lang.String message, java.lang.Object... args)
protected final void logDebug(java.lang.String message, java.lang.Throwable cause, java.lang.Object... args)
protected final void logInfo(java.lang.String message, java.lang.Object... args)
protected final void logInfo(java.lang.String message, java.lang.Throwable cause, java.lang.Object... args)
protected final void logWarning(java.lang.String message, java.lang.Object... args)
protected final void logWarning(java.lang.String message, java.lang.Throwable cause, java.lang.Object... args)
protected final void logError(java.lang.String message, java.lang.Object... args)
protected final void logError(java.lang.String message, java.lang.Throwable cause, java.lang.Object... args)