You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Charles Moulliard <cm...@gmail.com> on 2010/02/26 15:08:25 UTC

ServiceListener and ServiceEvent (OSGI)

Hi,

Is it possible to customize the ServiceEvent class of the osgi
framework (= create a new type of Event, by example RECEIVE_FEEDBACK)
in order to notify and provide information to a bundle which has
created a ServiceListener  ?

Bundle A
--> register a ServiceListener (context.addServiceListener(this);
--> implement : event.getServiceReference().getProperty("objectClass");
        if (event.getType() == ServiceEvent.RECEIVE_FEEDBACK)
blablabla

Bundle B
--> Will notify Bundles that an event RECEIVE_FEEDBACK occured

Question : How can the bundle A receive a message when event
RECEIVE_FEEDBACK is fired from bundle B ?

Kind regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm

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


Re: ServiceListener and ServiceEvent (OSGI)

Posted by Charles Moulliard <cm...@gmail.com>.
I will have a look on Event Admin.

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm



On Fri, Feb 26, 2010 at 3:13 PM, Richard S. Hall <he...@ungoverned.org> wrote:
>
> On 2/26/10 10:08 PM, Charles Moulliard wrote:
>>
>> Hi,
>>
>> Is it possible to customize the ServiceEvent class of the osgi
>> framework (= create a new type of Event, by example RECEIVE_FEEDBACK)
>> in order to notify and provide information to a bundle which has
>> created a ServiceListener  ?
>>
>
> No.
>
>> Bundle A
>> -->  register a ServiceListener (context.addServiceListener(this);
>> -->  implement : event.getServiceReference().getProperty("objectClass");
>>         if (event.getType() == ServiceEvent.RECEIVE_FEEDBACK)
>> blablabla
>>
>> Bundle B
>> -->  Will notify Bundles that an event RECEIVE_FEEDBACK occured
>>
>> Question : How can the bundle A receive a message when event
>> RECEIVE_FEEDBACK is fired from bundle B ?
>>
>
> Do you need something like Event Admin?
>
> -> richard
>
>> Kind regards,
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *****************************
>> blog : http://cmoulliard.blogspot.com
>> twitter : http://twitter.com/cmoulliard
>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>> Apache Camel Group :
>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>
>> ---------------------------------------------------------------------
>> 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
>
>

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


Re: ServiceListener and ServiceEvent (OSGI)

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 2/26/10 10:08 PM, Charles Moulliard wrote:
> Hi,
>
> Is it possible to customize the ServiceEvent class of the osgi
> framework (= create a new type of Event, by example RECEIVE_FEEDBACK)
> in order to notify and provide information to a bundle which has
> created a ServiceListener  ?
>    

No.

> Bundle A
> -->  register a ServiceListener (context.addServiceListener(this);
> -->  implement : event.getServiceReference().getProperty("objectClass");
>          if (event.getType() == ServiceEvent.RECEIVE_FEEDBACK)
> blablabla
>
> Bundle B
> -->  Will notify Bundles that an event RECEIVE_FEEDBACK occured
>
> Question : How can the bundle A receive a message when event
> RECEIVE_FEEDBACK is fired from bundle B ?
>    

Do you need something like Event Admin?

-> richard

> Kind regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>
> ---------------------------------------------------------------------
> 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