Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] IServiceListener API break

On 14.08.2014 12:49, Wim Jongman wrote:
> This is causing major problems for us and if it is so for us I expect
> that others will soon follow once they upgrade to 3.8. Can't we roll
> back this change in 3.9 and add a new version of the Interface instead?
>  We would then have to deprecate version 3.8. because that introduced
> this API break. 

Hi Wim,

I'd rather not go down this route of adding an IServiceListener2
interface. This concept has pretty much failed for platform, why would
it work any better for us?
Versioning should IMO be handled at the OSGi level. Thus, we should
(eventually) remove the singleton restriction from o.e.ecf.discovery to
gain more flexibility.

In the meantime, can you say why consumers can't simply implement the
IServiceListener similar to:

package foo;

import org.eclipse.ecf.discovery.IServiceEvent;
import org.eclipse.ecf.discovery.IServiceListener;

public class ServiceListener implements IServiceListener {

	public boolean triggerDiscovery() {
		return false;
	}

	@Override
	public void serviceDiscovered(IServiceEvent anEvent) {
	}

	@Override
	public void serviceUndiscovered(IServiceEvent anEvent) {
	}
}

That works on discovery 4.x where triggerDiscovery() is ignored, as well
as 5.x.

M.


Back to the top