avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen McConnell" <mcconn...@osm.net>
Subject RE: [vote] lifecycle exceptions
Date Thu, 12 Apr 2001 16:14:14 GMT

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.

Borin wrote:
> So my final proposal for the runtime interfaces is this:
>
> interface Executable {
>     void start();
>     void stop();
> }
>
> interface Interruptable extends Executable {
>     void suspend(); // should this be interrupt()?
>     void resume();
> }

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 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

Cheers, Steve.



Mime
View raw message