Luiz, I did try your suggestion below but I keep getting the following error :

[ERROR] 48563 pool-1-thread-9:( org.red5.server.Scope.error ) Error while 
executing "leave" for client Client: 0 on handler [EMAIL PROTECTED] 
INFO   | jvm 1    | 2007/01/26 21:14:52 | java.lang.NullPointerException
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.red5.server.api.service.ServiceUtils.invokeOnClient(ServiceUtils.java:230)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
com.dmt.proto.Application.roomLeave(Application.java:379)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.red5.server.adapter.ApplicationAdapter.leave(ApplicationAdapter.java:314)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.red5.server.Scope.disconnect(Scope.java:340)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.red5.server.BaseConnection.close(BaseConnection.java:167)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.red5.server.net.rtmp.RTMPConnection.close(RTMPConnection.java:282)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.red5.server.net.rtmp.RTMPMinaConnection.close(RTMPMinaConnection.java:89)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.red5.server.net.rtmp.RTMPHandler.connectionClosed(RTMPHandler.java:219)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.red5.server.net.rtmp.RTMPMinaIoHandler.sessionClosed(RTMPMinaIoHandler.java:132)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.apache.mina.common.support.AbstractIoFilterChain$2.sessionClosed(AbstractIoFilterChain.java:163)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionClosed(AbstractIoFilterChain.java:461)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.apache.mina.common.support.AbstractIoFilterChain.access$700(AbstractIoFilterChain.java:52)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionClosed(AbstractIoFilterChain.java:758)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.red5.io.filter.ExecutorFilter.processEvent(ExecutorFilter.java:243)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
org.red5.io.filter.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:280)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO   | jvm 1    | 2007/01/26 21:14:52 |     at java.lang.Thread.run(Unknown 
Source)

I checked all the objects passed to the method - none of them are null objects.
Have you seen this error before?
(I'm invoking this method from within my roomLeave( ) method )

Thanks.


============================================
Luiz Filipe <[EMAIL PROTECTED]> wrote:     Hi  Oke.
  
 I´m  using the ServiceUtils to call client methods, see:
  
 ServiceUtils.invokeOnClient(IClient clientObject,current  
scope,"methodName",new Object[]{param}, callBackObject);
  
 Regards,
  
 Luiz  Filipe.
  
    -----Mensagem original-----
De: [EMAIL PROTECTED]    [mailto:[EMAIL PROTECTED] nome de oke _
Enviada em:    quinta-feira, 25 de janeiro de 2007 20:10
Para:    [email protected]
Assunto: [Red5] passing data back to server via    client callback function?


Hello all, does anyone have an    example of a java code snippet that shows a
complete use of    server-to-client callback feature that allows data to be 
passed
back to the    server?

Does the callback object have to be "registered" before it's    passed to the 
invoke( ) method of the connection?

I have the    following piece of server-side code but it seems that 
resultReceived( )
is    never executed:
-----------------------
    // inner    class to handle callback fn result from    ActionScript
     private class ClientCallback    implements IPendingServiceCallback
        {
        private String    memberName="";       // initialize to empty    string
           
         public void    resultReceived(IPendingServiceCall    call)
         {    
                 memberName=(String)call.getResult();
            }
        }
                :
                :
                :
      // fetch this client's id from client    flash obj
      ClientCallback nameInfo = new    ClientCallback();
         ((IServiceCapableConnection)current).invoke("getUserName", null,    
nameInfo);
                :
                :

and on the client, the servicing    function:

          netconn.getUserName()
          {
                return _global.memberID;
          }
----------------------


Any pointers    appreciated.

-Oke.
      

---------------------------------
   Expecting? Get great news right away with email    Auto-Check.
Try the Yahoo!    Mail Beta._______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org


 
---------------------------------
Have a burning question? Go to Yahoo! Answers and get answers from real people 
who know.
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to