From 8314429023482f3371768d4d1107e8fe64278858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Thu, 17 Sep 2015 09:15:59 +0200 Subject: [PATCH] Component lifecycle exceptions Common base class + exceptions for shutdown and destruction --- .../cmp/ComponentDestructionException.java | 34 +++++++++++++++++++ .../cmp/ComponentInitialisationException.java | 2 +- .../ebul/cmp/ComponentLifecycleException.java | 34 +++++++++++++++++++ .../ebul/cmp/ComponentShutdownException.java | 34 +++++++++++++++++++ .../ebul/cmp/ComponentStartupException.java | 2 +- 5 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 src/main/java/info/ebenoit/ebul/cmp/ComponentDestructionException.java create mode 100644 src/main/java/info/ebenoit/ebul/cmp/ComponentLifecycleException.java create mode 100644 src/main/java/info/ebenoit/ebul/cmp/ComponentShutdownException.java diff --git a/src/main/java/info/ebenoit/ebul/cmp/ComponentDestructionException.java b/src/main/java/info/ebenoit/ebul/cmp/ComponentDestructionException.java new file mode 100644 index 0000000..683138b --- /dev/null +++ b/src/main/java/info/ebenoit/ebul/cmp/ComponentDestructionException.java @@ -0,0 +1,34 @@ +package info.ebenoit.ebul.cmp; + + +public class ComponentDestructionException + extends ComponentLifecycleException +{ + + private static final long serialVersionUID = 629175189766144505L; + + + public ComponentDestructionException( ) + { + super( ); + } + + + public ComponentDestructionException( final String message , final Throwable cause ) + { + super( message , cause ); + } + + + public ComponentDestructionException( final String message ) + { + super( message ); + } + + + public ComponentDestructionException( final Throwable cause ) + { + super( cause ); + } + +} diff --git a/src/main/java/info/ebenoit/ebul/cmp/ComponentInitialisationException.java b/src/main/java/info/ebenoit/ebul/cmp/ComponentInitialisationException.java index 14aaee9..09af42b 100644 --- a/src/main/java/info/ebenoit/ebul/cmp/ComponentInitialisationException.java +++ b/src/main/java/info/ebenoit/ebul/cmp/ComponentInitialisationException.java @@ -2,7 +2,7 @@ package info.ebenoit.ebul.cmp; public class ComponentInitialisationException - extends ComponentException + extends ComponentLifecycleException { private static final long serialVersionUID = 6150762006182320443L; diff --git a/src/main/java/info/ebenoit/ebul/cmp/ComponentLifecycleException.java b/src/main/java/info/ebenoit/ebul/cmp/ComponentLifecycleException.java new file mode 100644 index 0000000..2ec2852 --- /dev/null +++ b/src/main/java/info/ebenoit/ebul/cmp/ComponentLifecycleException.java @@ -0,0 +1,34 @@ +package info.ebenoit.ebul.cmp; + + +public class ComponentLifecycleException + extends ComponentException +{ + + private static final long serialVersionUID = -2763592771128673598L; + + + public ComponentLifecycleException( ) + { + super( ); + } + + + public ComponentLifecycleException( String message , Throwable cause ) + { + super( message , cause ); + } + + + public ComponentLifecycleException( String message ) + { + super( message ); + } + + + public ComponentLifecycleException( Throwable cause ) + { + super( cause ); + } + +} diff --git a/src/main/java/info/ebenoit/ebul/cmp/ComponentShutdownException.java b/src/main/java/info/ebenoit/ebul/cmp/ComponentShutdownException.java new file mode 100644 index 0000000..c2b712b --- /dev/null +++ b/src/main/java/info/ebenoit/ebul/cmp/ComponentShutdownException.java @@ -0,0 +1,34 @@ +package info.ebenoit.ebul.cmp; + + +public class ComponentShutdownException + extends ComponentLifecycleException +{ + + private static final long serialVersionUID = -6951202395528197565L; + + + public ComponentShutdownException( ) + { + super( ); + } + + + public ComponentShutdownException( final String message , final Throwable cause ) + { + super( message , cause ); + } + + + public ComponentShutdownException( final String message ) + { + super( message ); + } + + + public ComponentShutdownException( final Throwable cause ) + { + super( cause ); + } + +} diff --git a/src/main/java/info/ebenoit/ebul/cmp/ComponentStartupException.java b/src/main/java/info/ebenoit/ebul/cmp/ComponentStartupException.java index 263522b..426af43 100644 --- a/src/main/java/info/ebenoit/ebul/cmp/ComponentStartupException.java +++ b/src/main/java/info/ebenoit/ebul/cmp/ComponentStartupException.java @@ -2,7 +2,7 @@ package info.ebenoit.ebul.cmp; public class ComponentStartupException - extends ComponentException + extends ComponentLifecycleException { private static final long serialVersionUID = -8010582342593242803L;