Package | sekati.rpc |
Class | public class RemotingService |
Inheritance | RemotingService ![]() |
var rs : RemotingService = new RemotingService( "http://www.5etdemi.com/amfphp/gateway.php" ); rs.addEventListener( ServiceEvent.FAULT, faultHandler ); rs.addEventListener( ServiceEvent.RESULT, resultHandler ); rs.execute( 'Class.method', {arg1:"foo", arg2:"13"} ); protected function resultHandler(e : ServiceEvent) : void { trace( "RESULT.HANDLER:###:::::%%%%=> [" + e.result + "]" ); } protected function faultHandler(e : ServiceEvent) : void { trace( "FAULT.HANDLER:###:::::%%%%=> [" + e.fault + "]" ); }
See also
Property | Defined by | ||
---|---|---|---|
responder : Responder | RemotingService |
Method | Defined by | ||
---|---|---|---|
RemotingService(gatewayURL:String)
RemotingService Constructor
| RemotingService | ||
execute(command:String, ... args):void
Execute a remote call.
| RemotingService |
Method | Defined by | ||
---|---|---|---|
callHandler(o:Object):void
Handle the call return; determine whether it is a result or a
fault and dispatch the appropriate event.
| RemotingService | ||
faultHandler(fault:*):void
Dispatch information about failures.
| RemotingService | ||
resultHandler(result:*):void
Dispatch the results of a remoting method call.
| RemotingService |
responder | property |
protected var responder:Responder
RemotingService | () | constructor |
public function RemotingService(gatewayURL:String)
RemotingService Constructor
ParametersgatewayURL:String — the AMFPHP service gateway URL.
|
callHandler | () | method |
protected function callHandler(o:Object):void
Handle the call return; determine whether it is a result or a fault and dispatch the appropriate event.
Parameterso:Object |
execute | () | method |
public function execute(command:String, ... args):void
Execute a remote call.
Parameterscommand:String — of the remote method
|
|
... args — to pass to remote method call.
|
faultHandler | () | method |
protected function faultHandler(fault:*):void
Dispatch information about failures.
Parametersfault:* |
resultHandler | () | method |
protected function resultHandler(result:*):void
Dispatch the results of a remoting method call.
Parametersresult:* |