XMPP Presence: getPresence and isAvailable don't work? sendPresence with PROBE is asynchronous?

89 views
Skip to first unread message

Artem Kuroptev

unread,
Nov 10, 2011, 9:12:38 AM11/10/11
to Google App Engine
Hello everyone.

I would appreciate if somebody can clarify these things:

1. XMPPService.getPresence(..).isAvailable() constantly returns
'false' as of today. Is that a temporary behavior, or this methods
don't work anymore?

2. Is sendPresence method with PROBE PresenceType asynchronous?

3. Is that correct, that now there is no way to check JID presence
(whether user online) synchronously?

I have tried to read the docs. As been noted in Version 1.5.5 release
notes:
##
In the XMPP API, getPresence() is deprecated in favor of using the
inbound presence handlers documented in
http://code.google.com/appengine/docs/java/xmpp/overview.html#Handling_User_Presence.
##
and getPresence marked as deprecated in the current SDK. But in Java
world "deprecated" usually used to change syntax or semantics, and
leave incorrect method to maintain legacy. But not to mark method as
"non working". So it is unclear what really happened with
'getPresence(..).isAvailable()'.

Thanks.

Gerald Tan

unread,
Nov 10, 2011, 11:38:42 AM11/10/11
to google-a...@googlegroups.com
1. Still works for me AFAICS
2. Yes, it's asynchronous, the results come in at /_ah/xmpp/presence/available/ and /_ah/xmpp/presence/
unavailable/  however, I've found that most of the users that I probe do not respond with an unavailable presence, as I've mentioned here: https://groups.google.com/forum/#!topic/google-appengine-java/vQX4TFkY3AU
3. If XMPPService.getPresence() gets removed, then there probably will not be anyway to check presence synchronously except by maintaining a persistent list of connected JIDs, and there's plenty of issues with this method.

For now I'm sticking with using getPresence() as it still works for me... hope nothing happens to it...

Artem Kuroptev

unread,
Nov 11, 2011, 5:16:21 AM11/11/11
to Google App Engine
'isAvailable' still does not work for me.

Anyhow, banishing of synchronous 'isAvailable' method means a pretty
big change. Previously, recipient's JID was all needed, to send a xmpp
message. From now on, GAE application have to maintain a 'roster' with
statuses of the subscribers. And now it is unable to check recipient's
status, and send a message. Status have to be already stored in
roster. And app must handle 'error' xmpp responses to adjust that
statuses. BTW, there is no methods nor classes in the current GAE Java
SDK to parse 'error' stanzas.

On Nov 10, 6:12 pm, Artem Kuroptev <kurop...@gmail.com> wrote:
> Hello everyone.
>
> I would appreciate if somebody can clarify these things:
>
> 1. XMPPService.getPresence(..).isAvailable() constantly returns
> 'false' as of today. Is that a temporary behavior, or this methods
> don't work anymore?
>
> 2. Is sendPresence method with PROBE PresenceType asynchronous?
>
> 3. Is that correct, that now there is no way to check JID presence
> (whether user online) synchronously?
>
> I have tried to read the docs. As been noted in Version 1.5.5 release
> notes:
> ##
> In the XMPP API, getPresence() is deprecated in favor of using the
> inbound presence handlers documented inhttp://code.google.com/appengine/docs/java/xmpp/overview.html#Handlin....
Reply all
Reply to author
Forward
0 new messages