[Red5devs] How to get the values from ISharedObject ?

Arun a.arun at agriya.in
Thu Jun 7 08:17:02 EDT 2007


Hi Rob !

I am really happy with your quick reply.

I am a newbie to Red5 and JAVA.

I can understand the logic what you sent to me.

Can you please gimme a small code sample.. ?

Here, I have paste my code.

 

 

      @Override

      public boolean appConnect(IConnection conn, Object[] params) {

            ISharedObject so;

            IScope a = Red5.getConnectionLocal().getScope();

            so = getSharedObject(a, "so_users", false);

            so.beginUpdate();

            HashMap<String, Object> hm = new HashMap<String, Object>();

            addToUserList(params[0].toString(), conn.getClient().getId());

            so.setAttribute(conn.getClient().getId(), hm);

            so.endUpdate();

            return true;

      }

 

 

 

Thanks and Regards,

 

A.Arun

Flash Programmer,

Agriya Infoway,

Chennai - 600 034

 

-----Original Message-----
From: Red5devs-bounces at osflash.org [mailto:Red5devs-bounces at osflash.org] On
Behalf Of Rob Schoenaker
Sent: Thursday, June 07, 2007 11:18 AM
To: Red5devs at osflash.org
Subject: Re: [Red5devs] How to get the values from ISharedObject ?

 

>Can you anyone tell me how to get the ISharedObject Values to get all

the current user names ???

 

use getAttributeNames() to get all the names of the values. Then iterate

through the list and used getAttribute(name) for every item in the

names-list

 

/Rob

 

 

_______________________________________________

Red5devs mailing list

Red5devs at osflash.org

http://osflash.org/mailman/listinfo/red5devs_osflash.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5devs_osflash.org/attachments/20070607/2cea953d/attachment.htm


More information about the Red5devs mailing list