Description
An abstract class to create remote objects.
Details
Properties (4)
-
autoload
-
<attribute name="autoload" type="boolean" value="true" />
public var autoload : Boolean;
Load remote object during init. If false, create remote object by
calling load(). Default is true.
-
proxy
-
<attribute name="proxy" type="expression" value="null" />
public read-only var proxy : Object;
The remote proxy object. Proxy is set after the rpc object
loads. Proxy contains client-side function stubs to remote
methods. Each method takes an array of arguments and a delegate
like:
myrpc.proxy.remoteFunc( [ p1, p2, ..., pN ], delegate );
Remote methods with no arguments are passed in an empty array
like:
myrpc.proxy.otherRemoteFunc( [], delegate );
The delegate is used to handle the return value since RPC calls
are asynchronous.
-
secure
-
<attribute name="secure" type="boolean" value="false" />
public var secure : Boolean;
Make connection secure between client and the LPS secure
(HTTPS). Default is false.
-
secureport
-
<attribute name="secureport" type="number" value="null" />
public var secureport : Number;
The port to use for the secure socket between the client and the
LPS. If secure is false, this value is ignored.
Methods (2)
-
load()
-
ABSTRACT: method to load the remote object interface.
-
unload()
-
public function unload();
Interface to unload proxy stub. Default is to null proxy.
Events (4)
-
ondata
-
<attribute name="ondata" />
This event is triggered when declared inner calls do not handle
their ondata events.
-
onerror
-
<attribute name="onerror" />
This event is triggered when an error or timeout occurs associated
with getting this object or calling one of its remote methods.
-
onload
-
<attribute name="onload" />
This event is triggered when the remote object is loaded.
-
onunload
-
<attribute name="onunload" />
This event is triggered when the remote object is unloaded.
LZX Synopsis
<class name="
rpc" extends="
LzNode
">
<attribute name="
autoload
" type="
boolean" value="
true" />
<attribute name="
proxy
" type="
expression" value="
null" />
<attribute name="
secure
" type="
boolean" value="
false" />
<attribute name="
secureport
" type="
number" value="
null" />
</class>
JavaScript Synopsis
public
rpc extends
LzNode
{
public read-only var
proxy
:
Object;
prototype public function
load
();
prototype public event
ondata
;
prototype public event
onload
;
prototype public function
unload
();
}