[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] problems with XMPPContainer and IRemoteServiceContainerAdapter

On 10/14/2010 8:25 AM, Markus Alexander Kuppe wrote:
On 10/14/2010 05:17 PM, Eugen Reiswich wrote:
Hi folks,

I'm trying to use remote services over ECF with the XMPP provider. In
order to register and retriever remote services I need to get the
IPresenceContainerAdapter adapter = (IPresenceContainerAdapter)

I'm running in a NPE. Debugging the ECF-Code I found out that
the XMPPContainer returns null
providing org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter as clazz

public Object getAdapter(Class clazz) { if (clazz.equals(IPresenceContainerAdapter.class)) return this; if (clazz.equals(ISendFileTransferContainerAdapter.class)) return outgoingFileTransferContainerAdapter; else return super.getAdapter(clazz); }

Btw. the IPresenceContainerAdapter works fine. Any idea?
Has the org.eclipse.ecf.provider.xmpp.remoteservice bundle been deployed
and registered?

Just to follow up with an explanation of why this fragment is necessary: the xmpp.remoteservice bundle re-uses the ECF generic implementation of the IRemoteServiceContainerAdapter...it does this by creating an IAdapterFactory extension (specifically, XMPPRemoteServiceAdapterFactory).

This extension is then processed and used to respond with non-null IRemoteServiceContainerAdapter in the return super.getAdapter(clazz); in the XMPPContainer impl of getAdapter(Class clazz).

So that fragment is now necessary (along with it's dependency on org.eclipse.ecf.provider.remoteservice) to get/use the IRemoteServiceContainerAdapter for xmpp.


ecf-dev mailing list