Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [osgi-dev] is AllServiceListener called with ServiceEvent of Type MODIFIED_ENDMATCH

Perhaps I have forgotten more that I should have.  We already have an UnfliteredServiceListener and now I understand your question :)
 
No, I cannot think of a good reason one would register an UnfliteredServiceListener with no filter specified.  But I also do not think the framework should restrict such behavior.

Tom
 
 
 
----- Original message -----
From: Thomas Watson/Austin/IBM
To: osgi-dev@xxxxxxxxxxx
Cc:
Subject: Re: [EXTERNAL] [osgi-dev] is AllServiceListener called with ServiceEvent of Type MODIFIED_ENDMATCH
Date: Mon, Jun 21, 2021 7:26 AM
 
AllServiceListener behaves identical to the ServiceListener behavior with the one exception that bundle resolution wiring does not influence which service events an AllServiceListener receives.  AllServiceListener implementations will receive the MODIFIED_ENDMATCH event.
 
It is not clear to me why we would want another interface to indicate an unfiltered listener given that current listener implementations can be registered with a null filter to be unfiltered.  It would open many questions that I think would make the API more awkward.  Would we then need an UnfilteredAllServiceListener?  What happens if such a listener is registered with a filter?  What would happen if a "normal" ServiceListener is registered with a null filter?

Tom
 
 
 
----- Original message -----
From: Stefan Bischof <stbischof@xxxxxxxxxxx>
Sent by: "osgi-dev" <osgi-dev-bounces@xxxxxxxxxxx>
To: osgi-dev@xxxxxxxxxxx
Cc:
Subject: [EXTERNAL] [osgi-dev] is AllServiceListener called with ServiceEvent of Type MODIFIED_ENDMATCH
Date: Sun, Jun 20, 2021 2:43 PM
 

Hi,

1.

is AllServiceListener called with ServiceEvent of Type MODIFIED_ENDMATCH ?

I would say yes, but i am a bit curios about the explicit naming of "
registered, modified, unregistering" in the javadoc. Sure , a service is modified and the MODIFIED_ENDMATCH only says something about the filter of the listener. But I could not fully convince myself. And this list needs more attention ;-)

```

JavaDoc:

 * {@code AllServiceListener} objects are called with a {@code ServiceEvent}
 * object when a service is registered, modified, or is in the process of
 * unregistering.
```


2.
is there any case where is is useful to use a UnfilteredServiceListener when registering  the listener without a filter?


Thank you and best regards
Stefan Bischof

 

 

_______________________________________________
osgi-dev mailing list
osgi-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://accounts.eclipse.org
 
 



Back to the top