Package | com.vmware.flexutil.proxies |
Class | public class BaseProxy |
Inheritance | BaseProxy ![]() |
Exposes a simple, easy-to-use api for
making remote calls. The callService
method can be
used to make any remote service call.
Requires the callback function of the
form function(ev:MethodReturnEvent)
.
Method | Defined By | ||
---|---|---|---|
BaseProxy(serviceName:String, channelUri:String) | BaseProxy | ||
callService(methodName:String, arguments:Array, callback:Function = null, callContext:Object = null):void
Calls a remote service Java method. | BaseProxy |
BaseProxy | () | Constructor |
public function BaseProxy(serviceName:String, channelUri:String)
Parameters
serviceName:String — The service that this proxy talks to.
This should match the flex:remoting-destination declared in the
webapp/WEB-INF/spring/bundle-context.xml configuration file.
| |
channelUri:String — The channel associated with the underlying service.
|
callService | () | method |
public function callService(methodName:String, arguments:Array, callback:Function = null, callContext:Object = null):void
Calls a remote service Java method.
Parameters
methodName:String — Java method name to be invoked.
| |
arguments:Array — method arguments.
| |
callback:Function (default = null ) — function(ev:MethodReturnEvent)
| |
callContext:Object (default = null ) — object that needs to be passed back to caller via callback.
|
public class PluginServiceProxy extends BaseProxy { private static const SERVICE_NAME:String = "PluginService"; public function PluginServiceProxy( channelUri:String=null) { super(SERVICE_NAME, channelUri); } public function someMethod( parameter:String, callback:Function = null, context:Object = null):void { callService("someMethod", [parameter], callback, context); } }