felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bosschaert <david.bosscha...@gmail.com>
Subject Re: How to use a service immediately after its activation?
Date Tue, 18 Mar 2014 21:19:06 GMT
oops, that first link should be:
http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/hooks/service/FindHook.html

On 18 March 2014 14:17, David Bosschaert <david.bosschaert@gmail.com> wrote:
> Hi Bertrand,
>
> I guess one thing you might be able to do is have a service registry
> hook that hides the service until you 'release' it. It would involve
> writing a FindHook [1] and a ListenerHook [2] that would hide the
> service for any other bundle than the one registering it until it
> calls some API on that hook impl to tell it that the service is
> generally available.
>
> Hope this helps...
>
> David
>
> [1] http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/hooks/bundle/FindHook.html
> [2] http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/hooks/service/EventListenerHook.html
>
> On 18 March 2014 14:09, Bertrand Delacretaz <bdelacretaz@apache.org> wrote:
>> Hi,
>>
>> On Tue, Mar 18, 2014 at 7:24 PM, David Jencks <david_jencks@yahoo.com> 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.
>>
>> 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.
>>
>> -Bertrand
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message