Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] review for xmpp provider bug

Hi Eugen,

Eugen Reiswich wrote:
Hi Scott, how do I send a presence update? I tried to use: getRosterManager().getPresenceSender().sendPresenceUpdate(xmppid, IPresence.Type.AVAILABLE); but this didn't work because the ECF implementation says: public void sendPresenceUpdate(ID targetId, IPresence presence) throws ECFException { // unimplemented as we have no concept of presence support, either online or offline
}

IPresenceSender.sendPresenceUpdate is implemented...at least in the current version of the ECF XMPP provider...via this class:
org.eclipse.ecf.internal.provider.xmpp.XMPPContainerPresenceHelper  line 237

The code you quote above seems to be from the collab example code...i.e. in this class: org.eclipse.ecf.internal.example.collab.presence.PresenceContainer. You should almost certainly *not* be using this provider of the presence API...but rather one from the org.eclipse.ecf.provider.xmpp bundle (the actual XMPP provider). To get/use the real XMPP provider with remote services, you should be using/including these bundles (plus dependencies):

org.eclipse.ecf.provider.xmpp (xmpp provider)
org.eclipse.ecf.provider.remoteservices (remote services impl code reused by xmpp provider to do remote services)

The container factory name for the XMPP provider is:

XMPPS/Gmail:  ecf.xmpps.smack
XMPP:  ecf.xmpp.smack

So to create a container for your client that uses these full implementations it would be code like

IContainer container = containerFactory.createContainer("ecf.xmpps.smack");
...etc.

Scott



Back to the top