Hello Bertrand,

On 18 Mar 2014, at 22:09 pm, Bertrand Delacretaz <[email protected]> wrote
> On Tue, Mar 18, 2014 at 7:24 PM, David Jencks <[email protected]> wrote:
>> ...If you have a DS component with a reference to your desired service, with 
>> a bind method,
>> the bind method will be called at some point when the desired service is 
>> available,
>> whether the service or your component starts first...
> 
> Ah yes, of course...this makes me realize that what I'm actually
> looking for is a way for my code to interact with the service before
> DS components even see it, if that's possible.

From your description it almost sounds like you want some mechanism that is 
similar to how a component that *needs* configuration before it can do its 
thing first publishes its ManagedService interface and waits for updated to be 
invoked (with a valid configuration). After that has happened will it publish 
its own, primary service interface.

On the other hand, you might actually need the desired service itself to talk 
to it before other do with your current design. As others have pointed out, 
that's pretty much impossible. So redesigning it in the direction mentioned 
above is something I would consider.

> So it looks like my core question is whether the framework or DS
> provide a "service is about to be made available" hook - is there such
> a thing? Barring that I guess my best option is to use a specific
> start level to run my piece of code in the appropriate startup phase.

Can you explain *why* you first need to talk to this service before other do? 
Perhaps that explanation will trigger other design solutions.

Greetings, Marcel


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to