[Red5] Java inline Object

szybki szybki at gmail.com
Wed Jul 22 03:49:24 PDT 2009


in your case (assuming that I understand what you're trying to do):
((IServiceCapableConnection) adminConn).invoke("updateSubscribers", new
Object[] {scope.getStatistics().getActiveConnections(), someValue,
someOtherValue, anythingYouWant});

so generally you put  between "{}" everything you want to pass to
client (you're creating anonymous array).

btw., it's rather java (not red5) specific question..


((IServiceCapableConnection) adminConn).invoke("updateSubscribers", new
Object[] { });

2009/7/22 Julien KRIVACSY <julien at emprint.fr>:
> Hello,
>
> Is there a way to create objects in one line in Java like in AS : var
> myObj:Object = {myvar: myvalue, myvar2: 2};
>
> Because i'm trying to invoke a method (by the way, what is the difference
> between invoke ad notify ?) like this :
> ((IServiceCapableConnection) adminConn).invoke("updateSubscribers", stats);
>
> and stats apparently cannot be a simple int as I want it to be :
> ((IServiceCapableConnection) adminConn).invoke("updateSubscribers",
> scope.getStatistics().getActiveConnections());
>
> I read something about it which was doing something like that :
> ((IServiceCapableConnection) adminConn).invoke("updateSubscribers", new
> Object[] { });
>
> but what should I put between the {} ?
>
> Thank you, Julien.
>
>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>



More information about the Red5 mailing list