Re: ServiceReference.isAssignableTo

2010-02-22 Thread Richard S. Hall
On 2/22/10 8:15 PM, Guido Spadotto wrote: On 22/02/2010 13.02, Richard S. Hall wrote: It is not clear to me why you are doing this at all. Are you using AllServiceListeners or something? If you just looking up a service via getServiceReferences() or a normal ServiceListener, the framework will

Re: ServiceReference.isAssignableTo

2010-02-22 Thread Guido Spadotto
On 22/02/2010 13.02, Richard S. Hall wrote: It is not clear to me why you are doing this at all. Are you using AllServiceListeners or something? If you just looking up a service via getServiceReferences() or a normal ServiceListener, the framework will only give you references with which your b

Re: ServiceReference.isAssignableTo

2010-02-22 Thread Richard S. Hall
undle(), IMyInterface.class.getName())) { log.debug("Service Reference [" + i + "] is assignable to IMyInterface"); return (IMyInterface) this.bundleContext.getService(sref[i]); } But, looking at the OSGi API docs, I think that ServiceReference.isAssignableT

ServiceReference.isAssignableTo

2010-02-22 Thread Guido Spadotto
ot;Service Reference [" + i + "] is assignable to IMyInterface"); return (IMyInterface) this.bundleContext.getService(sref[i]); } But, looking at the OSGi API docs, I think that ServiceReference.isAssignableTo does NOT mean that you can cast the