|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LifecycleMonitor
This interface can be used to monitor the progress of an operation on the configuration manager. Typically, the monitor will receive a number of calls to addConfiguration as the configuration manager decides which configurations will be effected by the operations. This is followed by a call to loading, starting, stopping or unloading and then a call to succeeded or failed for each configuration added. The one notable exception to this is the load operation which calls addConfiguration and and immediately follows it with a reading and then succeeded or failed. This is because the load operation needs to read each configuration to determine which additional configurations will need to be loaded. When an operation fails, the failed method is called with the cause. The configuration manager normally will follow the failure with compensating actions to bring the server back to the original state. For example, if it loaded a configuration, it will unload it. Each of the compensating actions will cause events to be fired. When the, operation is completed, the finished method will be called. This should be called event if the operation ultimately fails and throws an exception. It is recommended that you do not rely the finished method to be called in the case of an Exception as there are cases that will cause the configuration manager to immediately return without notification (such as an AssertionError).
Method Summary | |
---|---|
void |
addConfiguration(Artifact configurationId)
Adds a configuration to be monitored. |
void |
failed(Artifact configurationId,
Throwable cause)
The previous operation on the specified configuration has failed due to the specified exception. |
void |
finished()
The operation on the configuration manager has finished. |
void |
loading(Artifact configurationId)
The configuration manager has begun loading the specified configuration. |
void |
reading(Artifact configurationId)
The configuration manager has started reading the specified configuration. |
void |
starting(Artifact configurationId)
The configuration manager has begun starting the specified configuration. |
void |
stopping(Artifact configurationId)
The configuration manager has begun stopping the specified configuration. |
void |
succeeded(Artifact configurationId)
The previous operation on the specified configuration has completed successfully. |
void |
unloading(Artifact configurationId)
The configuration manager has begun unloading the specified configuration. |
Method Detail |
---|
void addConfiguration(Artifact configurationId)
configurationId
- the configuration identifiervoid reading(Artifact configurationId)
configurationId
- the configuration identifiervoid loading(Artifact configurationId)
configurationId
- the configuration identifiervoid starting(Artifact configurationId)
configurationId
- the configuration identifiervoid stopping(Artifact configurationId)
configurationId
- the configuration identifiervoid unloading(Artifact configurationId)
configurationId
- the configuration identifiervoid succeeded(Artifact configurationId)
configurationId
- the configuration identifiervoid failed(Artifact configurationId, Throwable cause)
configurationId
- the configuration identifiervoid finished()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |