I'm thinking I'd prefer dynamic destinations over the selector
technique so I could manage security constraints for each of the
rooms.  I'm still getting my head around all this though.

-Tom

On 3/29/06, Matt Chotin <[EMAIL PROTECTED]> wrote:
>  We are also investigating adding dynamic destination support on top of
>  the selector technique.
>
>  Matt
>
>
>  -----Original Message-----
>  From: [email protected] [mailto:[EMAIL PROTECTED] On
>  Behalf Of Tom Bray
>  Sent: Wednesday, March 29, 2006 11:28 AM
>  To: [email protected]
>  Subject: Re: [flexcoders] Message destinations in the context of a
>  multi-room chat app
>
>  I was able to answer my own question.  In my original post I didn't
>  realize that the selector attribute of the Consumer component filtered
>  messages on the server side.  So, Stefan, if you want see what I'm
>  talking about, check out the sample chat application supplied with the
>  FDS installation.  In the chat.mxml file, change this line:
>
>  <mx:Consumer id="consumer" destination="chat-topic-jms"
>  message="messageHandler(event)"/>
>
>  by adding a selector attribute:
>
>  <mx:Consumer id="consumer" destination="chat-topic-jms"
>  message="messageHandler(event)" selector="room='Lobby'"/>
>
>  and then in the send() function, add a message header called room with
>  a value of "Lobby" like so:
>
>              public function send():void
>              {
>                    var message:AsyncMessage = new AsyncMessage();
>                    message.headers.userId = userId;
>                    message.headers.msg = msg.text;
>                    message.headers.room = "Lobby";
>                    producer.send(message);
>                    msg.text="";
>              }
>
>  So, you'll have just one destination called chat-topic-jms, but that
>  destination can serve multiple rooms by using a selector.  The server
>  only sends messages to clients that are both subscribed to that
>  destination and have specified a matching selector.  Let me know if
>  that makes sense.
>
>  Thanks,
>
>  Tom


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to