|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Action
The interface for Action Plugins.
Action Plugins utilize the ActionEnvironment
to retrieve informations
about incidents.
Method Summary | |
---|---|
Status |
execute(ActionEnvironment env)
Executes the Action Plugin to process incidents. |
Status |
setup(ActionEnvironment env)
Initializes the Plugin. |
void |
teardown(ActionEnvironment env)
Shuts the Plugin down and frees resources. |
Method Detail |
---|
Status setup(ActionEnvironment env) throws java.lang.Exception
IncidentRule
to be processed.
If the returned status is null or the status code is a
non-success code then teardown(ActionEnvironment)
will be called
next.
Resources like sockets or files can be opened in this method.
env
- the configured ActionEnvironment for this Plugin;
does not contain any incidents
java.lang.Exception
teardown(ActionEnvironment)
Status execute(ActionEnvironment env) throws java.lang.Exception
This method may be called at the scheduled intervals, but only if incidents
occurred in the meantime. If the Plugin execution takes longer than the
schedule interval, subsequent calls to
execute(ActionEnvironment)
will be skipped until this method
returns. After the execution duration exceeds the schedule timeout,
PluginEnvironment.isStopped()
will return true. In this
case execution should be stopped as soon as possible. If the Plugin
ignores PluginEnvironment.isStopped()
or fails to stop execution in
a reasonable timeframe, the execution thread will be stopped ungracefully
which might lead to resource leaks!
env
- a ActionEnvironment object that contains the Plugin
configuration and incidents
java.lang.Exception
void teardown(ActionEnvironment env) throws java.lang.Exception
IncidentRule
have been processedThe Plugin methods setup, execute and teardown are called on different threads, but they are called sequentially. This means that the execution of these methods does not overlap, they are executed one after the other.
All by the Plugin allocated resources should be freed in this method. Examples are opened sockets or files.
java.lang.Exception
setup(ActionEnvironment)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |