Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] org.eclipse.ecf.presence.IFQID

Hi Eugen,

Eugen Reiswich wrote:
Hi Scott,

thanks for the hint with Remote-OSGi-Services in your last email. I will try it out this weekend and give you feedback. The problem with IDFQ is the following: The 'id' I'm trying to get the resource for is an item in the IRosterEntry-object:
IRosterEntry entry = (IRosterEntry) object;
ID id = entry.getUser().getID();
_IFQID_ fqID = id.getAdapter(_IFQID_.class);

If I got it right the problem is located in the XMPPContainerPresenceHelper in this method:
protected void handleIQEvent(IQEvent evt) {
....
final IRosterEntry entry = createRosterEntry(item);
....
}

The IRosterEntry object created in this method does not contain any resources as the RosterPacket.Item 'item' doesn't have this information either. And if I try to obtain this information from the IRosterEntry-object the result is just a "/". I've been thinking how to solve this issue but I have got not idea how to obtain the resource information as in my opinion the RosterPacket.Item is the first and only information I get from the XMPP-Server. Have you got any ideas?

Yes, yesterday I added code that replaces the resource in the xmpp id when a message from server (presence available in many cases) arrives. So now it should have the resource value for the xmppids of the available roster entries. Please give it a try and see:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=246155


And even if we are able to get the resources for an ID, will all the Remote-OSGi-Services work with this? I mean there will be one user with several resources and though I'll need to distinguish the remote-services for each user/resource pair. Problems over problems, sorry for that. I already talked to Markus Alexander Kuppe and we'll meet in a few weeks to talk about this issue.

I think the solution I put in place should work properly, although any code that calls getResourceName() will have to deal with the possibility that the resource is null (since there is no info from the server or elsewhere about what the users id has as it's current resource).

Thanks,

Scott



Cheers,
Eugen

Am 29.10.2008 um 21:51 schrieb Scott Lewis:

Hi Eugen,

I'm looking at this now and need to ask...where are you calling the code

IDFQ idfq = (IDFQ) id.getAdapter(IDFQ.class);
idfq.getResourceName();

I guess what I'm asking is: how do you get the 'id' above (is it a listener and if so which one).

Thanks,

Scott

Eugen Reiswich wrote:
Hi folks,

I'm trying to work with the above mentioned ID to get the resource for an XMPP-ID. According to this solution: https://bugs.eclipse.org/bugs/show_bug.cgi?id=246155 I should be able to call:

IDFQ idfq = (IDFQ) id.getAdapter(IDFQ.class);
idfq.getResourceName();

But unfortunately this doesn't work for me. The resource I get is always empty. I'm basically trying to display online user in a tree with the associated resource using XMPP as protocol. When I debug my code my IRosterEntry-objects are all listed without a resource. This is the way how I retrieve the IRoster:

IPresenceContainerAdapter adapter = (IPresenceContainerAdapter) this.containter
.getAdapter(IPresenceContainerAdapter.class);

IRosterManager rosterManager = adapter.getRosterManager();
IRoster roster = rosterManager.getRoster(); I would really appreciate if someone could help me with my problem.

Cheers,
Eugen
------------------------------------------------------------------------

_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx <mailto:ecf-dev@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/ecf-dev


_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx <mailto:ecf-dev@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/ecf-dev

------------------------------------------------------------------------

_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev



Back to the top