avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject Re: Startable doesn't has a isRunning() interface ?
Date Thu, 09 Oct 2003 00:44:21 GMT


Yannick Menager wrote:

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


With the notion of a block listener and appliance listener on the 
drawing board, there is by implication the notion of a component 
listener.  A component listener would potentially listen to component 
initiated lifecycle and runtime events.  However, before anything 
becomes "standard" it needs to be validated and proven.  That means 
playing with container specific solutions.

Stephen.


>
>
> 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" 
>> <ymenager_ml@fastmail.fm>
>> To: <dev@avalon.apache.org>
>> 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" 
>>>> <ymenager_ml@fastmail.fm>
>>>> To: <dev@avalon.apache.org>
>>>> 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: dev-unsubscribe@avalon.apache.org
>>>>> For additional commands, e-mail: dev-help@avalon.apache.org
>>>>>
>>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>>> For additional commands, e-mail: dev-help@avalon.apache.org
>>>
>>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
> For additional commands, e-mail: dev-help@avalon.apache.org
>
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




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


Mime
View raw message