You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Chris Oman <CO...@ext-inc.com> on 2013/01/22 22:27:31 UTC

Vysper module presence

I am working on creating a custom module for Vysper. I would like it to show up in a users roster and show it as available. How do I send the initial presence message?

Thanks,
Chris


Chris Oman
Lead Developer - Interfaces
EXTENSION, INC.
Email:   COman@ext-inc.com
Office:  260-797-0200
General: 877-207-3753
www.OpenTheRedBox.com


Re: Vysper module presence

Posted by Chris Oman <CO...@ext-inc.com>.
Yes, good information. Thank you.


On Jan 24, 2013, at 10:51 AM, Bernd Fondermann wrote:

> On 24.01.13 15:40, Chris Oman wrote:
>> Thanks for the pointer. I think I can figure it out from there.
>>
>> And yes, I am using the MUC modules.
>
> Cool, since in this case, you might have some other handles where you
> could link in with your code:
>
> You could subclass
>    InMemoryRoomStorageProvider/RoomStorageProvider
> to control what happens upon room creation, or
>    InMemoryOccupantStorageProvider/OccupantStorageProvider
> when occupants join.
>
> This code currently is unreleased and must be taken from TRUNK.
> But TRUNK in it's current state should be much more stable than latest
> release. We just need to release it.
>
> HTH,
>
>   Bernd
>
>


Chris Oman
Lead Developer - Interfaces
EXTENSION, INC.
Email:   COman@ext-inc.com
Office:  260-797-0200
General: 877-207-3753
www.OpenTheRedBox.com


Re: Vysper module presence

Posted by Bernd Fondermann <bf...@brainlounge.de>.
On 24.01.13 15:40, Chris Oman wrote:
> Thanks for the pointer. I think I can figure it out from there.
>
> And yes, I am using the MUC modules.

Cool, since in this case, you might have some other handles where you 
could link in with your code:

You could subclass
    InMemoryRoomStorageProvider/RoomStorageProvider
to control what happens upon room creation, or
    InMemoryOccupantStorageProvider/OccupantStorageProvider
when occupants join.

This code currently is unreleased and must be taken from TRUNK.
But TRUNK in it's current state should be much more stable than latest 
release. We just need to release it.

HTH,

   Bernd



Re: Vysper module presence

Posted by Chris Oman <CO...@ext-inc.com>.
Thanks for the pointer. I think I can figure it out from there.

And yes, I am using the MUC modules.


On Jan 23, 2013, at 5:48 AM, Bernd Fondermann wrote:

> On 23.01.13 04:44, Chris Oman wrote:
>> Yep, I get that. I was way too short in trying to explain what we are
>> attempting to do.
>>
>> We are essentially wanting to create a bot that upon receipt of new
>> alerts, will create new conference rooms, post messages into the
>> conference rooms and then send directed invites to the appropriate
>> users for those alerts. From the few clients we have been seeing,
>> mediated invites look "off". So we wanted a contact in the user's
>> roster that represented our module/bot so that directed invites look
>> more appropriate - like they are coming from our system.
>>
>> It could be that I shouldn't be writing a module but should rather be
>> writing a client. But from what I have read about XMPP application
>> development in general, that doesn't seem like the best way to go.
>> That's why I went the module route.
>>
>> Does that bring clarification? Do you have any ideas of how I might
>> approach this "properly".
>
> I'm always in favor of building a dedicated client for that, but anyway.
> You can of course push Roster entries (and servers-side you have full
> control over RosterManager), but nevertheless an online client needs to
> accept new contacts.
>
> Basically, this is done by sending the related stanzas from the XMPP RFC
> specification. The full workflow can be seen coded in
> org.apache.vysper.xmpp.modules.core.im.handler.PresenceSubscriptionHandler.handleOutboundSubscriptionRequest()
>
> That's what I can tell you with limited time right now, if you need
> more, pls. keep posting.
>
> Are you using the MUC modules?
>
>   Bernd
>
>>
>> Thanks again, Chris
>>
>>
>> Chris Oman Lead Developer - Interfaces EXTENSION, INC. Email:
>> COman@ext-inc.com Office:  260-797-0200 General: 877-207-3753
>> www.OpenTheRedBox.com
>>

Chris Oman
Lead Developer - Interfaces
EXTENSION, INC.
Email:   COman@ext-inc.com
Office:  260-797-0200
General: 877-207-3753
www.OpenTheRedBox.com

>> ________________________________________ From: Bernd Fondermann
>> [bernd.fondermann@gmail.com] Sent: Tuesday, January 22, 2013 4:54 PM
>> To: dev@mina.apache.org Subject: Re: Vysper module presence
>>
>> Other users ("contacts") show up in the user's roster this way: 1.
>> user subscribes to the contact's presense 2. contact confirms
>> subscription 3. contact sends initial presence to the server 4.
>> server distributes presence message to all of contact's contact (e.g.
>> user)
>>
>> Vysper modules ares just for handling special messages, that is,
>> extending the server's capabilities. Vysper is capable out-of-the-box
>> to handle presence subscriptions etc.
>>
>> Bernd
>>
>> On Tue, Jan 22, 2013 at 10:27 PM, Chris Oman <CO...@ext-inc.com>
>> wrote:
>>> I am working on creating a custom module for Vysper. I would like
>>> it to show up in a users roster and show it as available. How do I
>>> send the initial presence message?
>>>
>>> Thanks, Chris
>>
>


Re: Vysper module presence

Posted by Bernd Fondermann <bf...@brainlounge.de>.
On 23.01.13 04:44, Chris Oman wrote:
> Yep, I get that. I was way too short in trying to explain what we are
> attempting to do.
>
> We are essentially wanting to create a bot that upon receipt of new
> alerts, will create new conference rooms, post messages into the
> conference rooms and then send directed invites to the appropriate
> users for those alerts. From the few clients we have been seeing,
> mediated invites look "off". So we wanted a contact in the user's
> roster that represented our module/bot so that directed invites look
> more appropriate - like they are coming from our system.
>
> It could be that I shouldn't be writing a module but should rather be
> writing a client. But from what I have read about XMPP application
> development in general, that doesn't seem like the best way to go.
> That's why I went the module route.
>
> Does that bring clarification? Do you have any ideas of how I might
> approach this "properly".

I'm always in favor of building a dedicated client for that, but anyway.
You can of course push Roster entries (and servers-side you have full 
control over RosterManager), but nevertheless an online client needs to 
accept new contacts.

Basically, this is done by sending the related stanzas from the XMPP RFC 
specification. The full workflow can be seen coded in
org.apache.vysper.xmpp.modules.core.im.handler.PresenceSubscriptionHandler.handleOutboundSubscriptionRequest()

That's what I can tell you with limited time right now, if you need 
more, pls. keep posting.

Are you using the MUC modules?

   Bernd

>
> Thanks again, Chris
>
>
> Chris Oman Lead Developer - Interfaces EXTENSION, INC. Email:
> COman@ext-inc.com Office:  260-797-0200 General: 877-207-3753
> www.OpenTheRedBox.com
>
> ________________________________________ From: Bernd Fondermann
> [bernd.fondermann@gmail.com] Sent: Tuesday, January 22, 2013 4:54 PM
> To: dev@mina.apache.org Subject: Re: Vysper module presence
>
> Other users ("contacts") show up in the user's roster this way: 1.
> user subscribes to the contact's presense 2. contact confirms
> subscription 3. contact sends initial presence to the server 4.
> server distributes presence message to all of contact's contact (e.g.
> user)
>
> Vysper modules ares just for handling special messages, that is,
> extending the server's capabilities. Vysper is capable out-of-the-box
> to handle presence subscriptions etc.
>
> Bernd
>
> On Tue, Jan 22, 2013 at 10:27 PM, Chris Oman <CO...@ext-inc.com>
> wrote:
>> I am working on creating a custom module for Vysper. I would like
>> it to show up in a users roster and show it as available. How do I
>> send the initial presence message?
>>
>> Thanks, Chris
>


RE: Vysper module presence

Posted by Chris Oman <CO...@ext-inc.com>.
Yep, I get that. I was way too short in trying to explain what we are attempting to do.

We are essentially wanting to create a bot that upon receipt of new alerts, will create new conference rooms, post messages into the conference rooms and then send directed invites to the appropriate users for those alerts. From the few clients we have been seeing, mediated invites look "off". So we wanted a contact in the user's roster that represented our module/bot so that directed invites look more appropriate - like they are coming from our system.

It could be that I shouldn't be writing a module but should rather be writing a client. But from what I have read about XMPP application development in general, that doesn't seem like the best way to go. That's why I went the module route.

Does that bring clarification? Do you have any ideas of how I might approach this "properly".

Thanks again,
Chris


Chris Oman
Lead Developer - Interfaces
EXTENSION, INC.
Email:   COman@ext-inc.com
Office:  260-797-0200
General: 877-207-3753
www.OpenTheRedBox.com

________________________________________
From: Bernd Fondermann [bernd.fondermann@gmail.com]
Sent: Tuesday, January 22, 2013 4:54 PM
To: dev@mina.apache.org
Subject: Re: Vysper module presence

Other users ("contacts") show up in the user's roster this way:
1. user subscribes to the contact's presense
2. contact confirms subscription
3. contact sends initial presence to the server
4. server distributes presence message to all of contact's contact (e.g. user)

Vysper modules ares just for handling special messages, that is,
extending the server's capabilities.
Vysper is capable out-of-the-box to handle presence subscriptions etc.

  Bernd

On Tue, Jan 22, 2013 at 10:27 PM, Chris Oman <CO...@ext-inc.com> wrote:
> I am working on creating a custom module for Vysper. I would like it to show up in a users roster and show it as available. How do I send the initial presence message?
>
> Thanks,
> Chris

Re: Vysper module presence

Posted by Bernd Fondermann <be...@gmail.com>.
Other users ("contacts") show up in the user's roster this way:
1. user subscribes to the contact's presense
2. contact confirms subscription
3. contact sends initial presence to the server
4. server distributes presence message to all of contact's contact (e.g. user)

Vysper modules ares just for handling special messages, that is,
extending the server's capabilities.
Vysper is capable out-of-the-box to handle presence subscriptions etc.

  Bernd

On Tue, Jan 22, 2013 at 10:27 PM, Chris Oman <CO...@ext-inc.com> wrote:
> I am working on creating a custom module for Vysper. I would like it to show up in a users roster and show it as available. How do I send the initial presence message?
>
> Thanks,
> Chris
>
>
> Chris Oman
> Lead Developer - Interfaces
> EXTENSION, INC.
> Email:   COman@ext-inc.com
> Office:  260-797-0200
> General: 877-207-3753
> www.OpenTheRedBox.com
>