[Red5] How to execute some code (ServerSide) everytime a clientcreate a SharedObject??

Juan Antonio Guzman Hidalgo juanantonio.guzman at iavante.es
Fri Nov 2 10:07:08 PDT 2007


You'll find some usefull info here:

http://www.joachim-bauch.de/tutorials/red5/MigrationGuide.txt#serverside-change-listeners
http://dl.fancycode.com/red5/api/org/red5/server/api/so/ISharedObjectListener.html
http://dl.fancycode.com/red5/api/org/red5/server/api/so/ISharedObjectListener.html#onSharedObjectUpdate(org.red5.server.api.so.ISharedObjectBase,%20java.lang.String,%20java.lang.Object)


2007/11/2, Juan Antonio Guzman Hidalgo <juanantonio.guzman at iavante.es>:
>
> Hello every one.
>
> Probably this is a Java programing question and have more to do with Java
> techniques than Red5 but maybe is useful for every red5 user that wants to
> improove thier applications.
>
> I'm using red5 in a flex app (it's quite similar than open meetings but in
> flex).
>
> I'm not the best java programmer and I know I'm wrong implementing some
> functionalities to my Red5 applications.  The thing is that my solution work
> but i would like to do it properly....
>
> I need to execute some code (on server side) everytime a client create or
> modify a SharedObject. The flex client do:
>
> ClientSide
> --------------------------------------
> [...]
> import flash.net.SharedObject;
> import flash.net.NetConnection;
> [...]
> NetConnection.defaultObjectEncoding=flash.net.ObjectEncoding.AMF0;
> SharedObject.defaultObjectEncoding=flash.net.ObjectEncoding.AMF0;
> [...]
> private var conn : NetConnection;
> private var so : SharedObject;
> [..]
> so.setProperty("start",true); <<-- (I need to execute some code in this
> moment on the Serverside.)
> -------------------------------------------------------------------
>
>
>
>
>
> Me and my really low knowlegments on Java programming are doing like this:
>
> Modifing the Red5 src code :
>
> in
>
> src/org/red5/server/so/SharedObject.java
>
> There is a part of code:
>
> -------------------------------------------------------------
> [...]
>     public SharedObject(Map<String, Object> data, String name, String
> path,
>                         boolean persistent, IPersistenceStore storage) {
>         this.data = null;
>         this.data = new ConcurrentHashMap<String, Object>();
>         this.data.putAll(data);
>         this.name = name;
>         this.path = path;
>         persistentSO = false;
>         this.persistentSO = persistent;
>         setStore(storage);
>
>         ownerMessage = new SharedObjectMessage(null, name, 0, persistent);
>         creationTime = System.currentTimeMillis();
>
>
>         //I put my code here
>
> [...]
>
> ----------------------------------------------------------------
>
> I was trying to override the SharedObject method but i'm not shure if i'm
> on the way.
>
> Is there someone illuminated?
>
> Bye.
>
>
> Juan.
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>






More information about the Red5 mailing list