| Package | gs.remoting |
| Class | public class RemotingCall |
Examples are in the guttershark repository.
| Property | Defined by | ||
|---|---|---|---|
| clearListenersOnSuccess : Boolean | RemotingCall | ||
| connection : NetConnection
Net connection for the remoting call.
| RemotingCall | ||
| endpoint : String
The service endpoint.
| RemotingCall | ||
| gateway : String
The remoting gateway.
| RemotingCall | ||
| method : String
The service method.
| RemotingCall | ||
| onBadVersion : Function
On bad version callback.
| RemotingCall | ||
| onClose : Function
The handler for when you close this call
by calling close().
| RemotingCall | ||
| onClosed : Function
On closed callback.
| RemotingCall | ||
| onConnect : Function
On connection callback.
| RemotingCall | ||
| onConnectFailed : Function
On connect failed callback.
| RemotingCall | ||
| onFault : Function
On fault callback.
| RemotingCall | ||
| onFirstCall : Function
On first call callback.
| RemotingCall | ||
| onIOError : Function
On io error event callback.
| RemotingCall | ||
| onProhibited : Function
On prohibited callback.
| RemotingCall | ||
| onResult : Function
On result callback.
| RemotingCall | ||
| onRetry : Function
On retry callback.
| RemotingCall | ||
| onSecurityError : Function
On security error callback.
| RemotingCall | ||
| onTimeout : Function
On timeout callback.
| RemotingCall | ||
| resultHandler : Class
The handler class that processes the returned result - this
should be an instance or subclass of RemotingCallResultHandler.
| RemotingCall | ||
| retries : int
The number of retries to allow (default is 1).
| RemotingCall | ||
| returnArgs : Boolean
Whether or not to return the args back to your onResult or
onFault callback.
| RemotingCall | ||
| statusEvent : NetStatusEvent
The last status event that was dispatched off of
the internal net connection.
| RemotingCall | ||
| timeout : int
The time to allow for each call before another
retry is sent (default is 3000, 3 seconds).
| RemotingCall | ||
| Method | Defined by | ||
|---|---|---|---|
|
RemotingCall(_gateway:String, _endpoint:String, _method:String, _objectEncoding:int = 3, _timeout:int = 3000, _retries:int = 1, _resultHandler:Class = null)
Constructor for RemotingCall instances.
| RemotingCall | ||
|
close():void
Closes the internal net connection and cancels
the request.
| RemotingCall | ||
|
get(id:String):RemotingCall
[static]
Get a remoting call.
| RemotingCall | ||
|
send(... _args):void
Send the call.
| RemotingCall | ||
|
set(id:String, rc:RemotingCall):void
[static]
Set a remoting call instance.
| RemotingCall | ||
|
setCallbacks(callbacks:Object):void
Set callbacks.
| RemotingCall | ||
|
setCredentials(username:String, password:String):void
Add a credentials header.
| RemotingCall | ||
|
setGateway(name:String, url:String):void
[static]
Save a gateway by name.
| RemotingCall | ||
|
unset(id:String):void
[static]
Unset (delete) a remoting call instance.
| RemotingCall | ||
| clearListenersOnSuccess | property |
public var clearListenersOnSuccess:Boolean
| connection | property |
public var connection:NetConnectionNet connection for the remoting call.
| endpoint | property |
public var endpoint:StringThe service endpoint.
| gateway | property |
public var gateway:StringThe remoting gateway.
| method | property |
public var method:StringThe service method.
| onBadVersion | property |
public var onBadVersion:FunctionOn bad version callback.
| onClose | property |
public var onClose:FunctionThe handler for when you close this call by calling close().
| onClosed | property |
public var onClosed:FunctionOn closed callback.
| onConnect | property |
public var onConnect:FunctionOn connection callback.
| onConnectFailed | property |
public var onConnectFailed:FunctionOn connect failed callback.
| onFault | property |
public var onFault:FunctionOn fault callback.
| onFirstCall | property |
public var onFirstCall:FunctionOn first call callback.
| onIOError | property |
public var onIOError:FunctionOn io error event callback.
| onProhibited | property |
public var onProhibited:FunctionOn prohibited callback.
| onResult | property |
public var onResult:FunctionOn result callback.
| onRetry | property |
public var onRetry:FunctionOn retry callback.
| onSecurityError | property |
public var onSecurityError:FunctionOn security error callback.
| onTimeout | property |
public var onTimeout:FunctionOn timeout callback.
| resultHandler | property |
public var resultHandler:ClassThe handler class that processes the returned result - this should be an instance or subclass of RemotingCallResultHandler.
| retries | property |
public var retries:intThe number of retries to allow (default is 1).
| returnArgs | property |
public var returnArgs:BooleanWhether or not to return the args back to your onResult or onFault callback.
| statusEvent | property |
public var statusEvent:NetStatusEventThe last status event that was dispatched off of the internal net connection.
| timeout | property |
public var timeout:intThe time to allow for each call before another retry is sent (default is 3000, 3 seconds).
| RemotingCall | () | constructor |
public function RemotingCall(_gateway:String, _endpoint:String, _method:String, _objectEncoding:int = 3, _timeout:int = 3000, _retries:int = 1, _resultHandler:Class = null)Constructor for RemotingCall instances.
Parameters_gateway:String — The remoting gateway url.
|
|
_endpoint:String — The endpoint.
|
|
_method:String — The method to call.
|
|
_objectEncoding:int (default = 3) — The timeout for this call.
|
|
_timeout:int (default = 3000) — The number of retries for this call.
|
|
_retries:int (default = 1) — A result handler class to process result or fault objects before
passing it back to your onResult or onFault callback.
|
|
_resultHandler:Class (default = null) |
| close | () | method |
public function close():voidCloses the internal net connection and cancels the request.
| get | () | method |
public static function get(id:String):RemotingCallGet a remoting call.
Parametersid:String — The remoting call id.
|
RemotingCall |
| send | () | method |
public function send(... _args):voidSend the call.
Parameters... _args — The remoting servie to send the call to.
|
| set | () | method |
public static function set(id:String, rc:RemotingCall):voidSet a remoting call instance.
Parametersid:String — The remoting call id.
|
|
rc:RemotingCall — The remoting call instance.
|
| setCallbacks | () | method |
public function setCallbacks(callbacks:Object):voidSet callbacks.
You can pass these callback properties:
callbacks:Object — An object with properties for callbacks you
want.
|
| setCredentials | () | method |
public function setCredentials(username:String, password:String):voidAdd a credentials header.
Parametersusername:String — The username.
|
|
password:String — The password.
|
| setGateway | () | method |
public static function setGateway(name:String, url:String):voidSave a gateway by name.
If you save a gateway you can use the shortcut name when creating new RemotingCall instances.
Parametersname:String — The shortcut name for the gateway (something like amfphp).
|
|
url:String — The gateay url.
|
RemotingCall.setGateway("amfphp","http://guttershark_amfphp/gateway.php");
var rc:RemotingConnection = new RemotingConnection("amfphp","Echoer","echoString");
//if you don't save the gateway, you have to provide the gateway url like this:
var rc:RemotingConnection = new RemotingConnection("http://guttershark_amfphp/gateway.php","Echoer","echoString");
| unset | () | method |
public static function unset(id:String):voidUnset (delete) a remoting call instance.
Parametersid:String — The remoting call id.
|