The container would generally not call isRunning().... But for example if I have an admin console, i would like it to be able to be informed of the state of each component. And I would like it to be a *standard* way for any Startable Component... be it using a isRunning() type of function, or using an event-based system, as long as it's standard :)

Jonathan Hawkes wrote:
In the current specification, it is fairly straightforward to implement an
Avalon container.  When would you suggest the container poll this new
isRunning method?  It would be preferable to have the component notify the
container if it shut itself down.  However, then you run the risk of
perverting IOC.

The Startable interface is simply a lifecycle interface that stipulates a
contract with the container.  The container does not really care what the
start() and stop() methods actually do -- or even what they start or stop.
The contract is simple, and I am opposed to complicating it.

Components are given the resources to manage themselves (that is the point).

----- Original Message ----- From: "Yannick Menager" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 08, 2003 1:22 PM
Subject: Re: Startable doesn't has a isRunning() interface ?




But that way you're putting a risk that the container might be out of
sync with the real state of the component. All that to save having an
extra function. I would think the downsides are bigger than the cost of
having an extra function to check the state of the component. Otherwise
most people will implement that function but it won't be standard,
reducing potential reusability, and causing pains to people who want to
incorporate dynamic administration capabilities in the container.

Jonathan Hawkes wrote:

Yes.  An isRunning() method would not be useful to the container.  The
container knows whether the startable isRunning or not (ie: it has

called


start() and not stop() ).

----- Original Message ----- From: "Yannick Menager" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 08, 2003 10:17 AM
Subject: Startable doesn't has a isRunning() interface ?





Is there any reason Startable doesn't has a isRunning() ( or something
like that ) interface ?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to