Lifecycle stage enum describes exception types

This commit is contained in:
Emmanuel BENOîT 2015-09-17 09:18:41 +02:00
parent 8314429023
commit 7558594ded

View file

@ -9,12 +9,27 @@ package info.ebenoit.ebul.cmp;
public enum LifecycleStage {
/** Initialisation stage */
INITIALISE ,
INITIALISE( ComponentInitialisationException.class ) ,
/** Startup stage */
START ,
START( ComponentStartupException.class ) ,
/** Shutdown stage */
STOP ,
STOP( ComponentShutdownException.class ) ,
/** 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;
}
}