avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [vote] lifecycle exceptions
Date Thu, 12 Apr 2001 16:40:05 GMT
Stephen McConnell wrote:
> Borin:
> In you last (excelent) message you proposed the following interface
> defintions which are very close to something I think would work well in our
> environment.

> So, including the relevant exceptions we would end up with the following
> interfaces:
>   interface Executable {
>      void start() throws StartException;
>      void stop() throws StopException;
>   }
>   interface Interruptable extends Executable {
>      void suspend() throws SuspendException;
>      void resume() throws ResumeException;
>   }
>   interface Suspendable { // better name, anyone?
>        void suspend() throws SuspendException;
>        void resume() throws ResumeException;
>   }
> +1

I was actually proposing the removal of Suspendable and replacing it with
Interruptable.  Why?  Because conceptually you can't suspend something
that is not currently running.  It doesn't really make sense.  If you can
give me a real use case where this would be necessary, and desirable, then
the Interruptable interface would extend both Suspendable and Executable.
I personally can't think of anything that would be better served in that

As to the addition of the exceptions, +1.

> I would just like to add an additional exception, extending StartException
> that can be thrown by a component when an attempt is made to start it and it
> cannot start for reasons of conflict between its own internal
> startup-mechanism and the explicit instruction to start.  I.e. this would
> allow a manager to catch the explicit exception case of an autonomous
> startup.
>   AutonomyConflictException : StartException

I think you've lost me there.  I've been suffering from a mild case of
sleep depravation, so I may not be thinking clearly.  Are you saying that
Component A is already started and Component B asks it to start again?
In the case that Component B is responsible for directly managing Component
A, then I can see the need to flag that Exception (although I would like
to see a better name for the Exception).

To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org

View raw message