Lifecycle stage enum describes exception types
This commit is contained in:
parent
8314429023
commit
7558594ded
1 changed files with 19 additions and 4 deletions
|
@ -9,12 +9,27 @@ package info.ebenoit.ebul.cmp;
|
||||||
public enum LifecycleStage {
|
public enum LifecycleStage {
|
||||||
|
|
||||||
/** Initialisation stage */
|
/** Initialisation stage */
|
||||||
INITIALISE ,
|
INITIALISE( ComponentInitialisationException.class ) ,
|
||||||
/** Startup stage */
|
/** Startup stage */
|
||||||
START ,
|
START( ComponentStartupException.class ) ,
|
||||||
/** Shutdown stage */
|
/** Shutdown stage */
|
||||||
STOP ,
|
STOP( ComponentShutdownException.class ) ,
|
||||||
/** Destruction stage */
|
/** Destruction stage */
|
||||||
DESTROY
|
DESTROY( ComponentDestructionException.class );
|
||||||
|
|
||||||
|
/** The type of exceptions thrown by this lifecycle stage action */
|
||||||
|
public final Class< ? extends ComponentLifecycleException > exceptionType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the type of exceptions for the lifecycle stage
|
||||||
|
*
|
||||||
|
* @param exceptionType
|
||||||
|
* the type of exceptions
|
||||||
|
*/
|
||||||
|
private LifecycleStage( Class< ? extends ComponentLifecycleException > exceptionType )
|
||||||
|
{
|
||||||
|
this.exceptionType = exceptionType;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue