You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Gene McCulley <mc...@stackframe.com> on 2013/05/31 01:01:22 UTC
injecting presence
I recently integrated Vysper into an internal collaboration tool and have been very happy with how well it works and how reliable it is.
One thing I tried to do was to inject presence events. The specific use case is that I want staff members to be able to set "away" status with a message via SMS when unexpectedly away.
It is not at all clear what the right thing to do is. First I tried to just send in a presence stanza with no "to" attribute, thinking it would be broadcast. That didn't seem to work. So I settled on updating the PresenceCache and sending a directed presence stanza to each of the buddies that is currently connected. This doesn't seem to work either and feels like the wrong approach. You can see my current code at https://github.com/StackFrame/sarariman/blob/master/src/java/com/stackframe/sarariman/xmpp/vysper/VysperXMPPServer.java in the setPresence() method.
Any guidance on the correct approach would be appreciated.
--
Gene McCulley
StackFrame, LLC
mcculley@stackframe.com
http://www.stackframe.com/
phone: 407-733-0885
fax: 321-256-2962
LinkedIn: http://www.linkedin.com/in/mcculley
Twitter: https://twitter.com/mcculley
Skype: genemcculley
114 W. 1st Street, Suite 246, Sanford, FL 32771
Re: injecting presence
Posted by Gene McCulley <mc...@stackframe.com>.
Bernd,
That did help. Thank you very much!
Bernd Fondermann wrote:
> Hi Gene,
>
> try to
> 1. put together the presence stanza on the server
> 2. collect some more stuff related to the context
> 3. call serverRuntimeContext.getHandler(presStanza).execute(...)
>
> Hope that helps,
>
> Bernd
>
> On May 30, 2013, at 7:01 PM, Gene McCulley <Mc...@stackframe.com> wrote:
>
>> I recently integrated Vysper into an internal collaboration tool and have been very happy with how well it works and how reliable it is.
>>
>> One thing I tried to do was to inject presence events. The specific use case is that I want staff members to be able to set "away" status with a message via SMS when unexpectedly away.
>>
>> It is not at all clear what the right thing to do is. First I tried to just send in a presence stanza with no "to" attribute, thinking it would be broadcast. That didn't seem to work. So I settled on updating the PresenceCache and sending a directed presence stanza to each of the buddies that is currently connected. This doesn't seem to work either and feels like the wrong approach. You can see my current code at https://github.com/StackFrame/sarariman/blob/master/src/java/com/stackframe/sarariman/xmpp/vysper/VysperXMPPServer.java in the setPresence() method.
>>
>> Any guidance on the correct approach would be appreciated.
>>
>> --
>> Gene McCulley
>> StackFrame, LLC
>> mcculley@stackframe.com
>> http://www.stackframe.com/
>> phone: 407-733-0885
>> fax: 321-256-2962
>> LinkedIn: http://www.linkedin.com/in/mcculley
>> Twitter: https://twitter.com/mcculley
>> Skype: genemcculley
>> 114 W. 1st Street, Suite 246, Sanford, FL 32771
>>
>>
>>
>
Re: injecting presence
Posted by Bernd Fondermann <be...@gmail.com>.
Hi Gene,
try to
1. put together the presence stanza on the server
2. collect some more stuff related to the context
3. call serverRuntimeContext.getHandler(presStanza).execute(...)
Hope that helps,
Bernd
On Fri, May 31, 2013 at 1:01 AM, Gene McCulley <mc...@stackframe.com>wrote:
> I recently integrated Vysper into an internal collaboration tool and have
> been very happy with how well it works and how reliable it is.
>
> One thing I tried to do was to inject presence events. The specific use
> case is that I want staff members to be able to set "away" status with a
> message via SMS when unexpectedly away.
>
> It is not at all clear what the right thing to do is. First I tried to
> just send in a presence stanza with no "to" attribute, thinking it would be
> broadcast. That didn't seem to work. So I settled on updating the
> PresenceCache and sending a directed presence stanza to each of the buddies
> that is currently connected. This doesn't seem to work either and feels
> like the wrong approach. You can see my current code at
> https://github.com/StackFrame/sarariman/blob/master/src/java/com/stackframe/sarariman/xmpp/vysper/VysperXMPPServer.javain the setPresence() method.
>
> Any guidance on the correct approach would be appreciated.
>
> --
> Gene McCulley
> StackFrame, LLC
> mcculley@stackframe.com
> http://www.stackframe.com/
> phone: 407-733-0885
> fax: 321-256-2962
> LinkedIn: http://www.linkedin.com/in/mcculley
> Twitter: https://twitter.com/mcculley
> Skype: genemcculley
> 114 W. 1st Street, Suite 246, Sanford, FL 32771
>
>
>
>