rpc/RpcService

dojo/rpc/RpcService

Summary

TODOC

Usage

var foo = new RpcService(args);

dojo/rpc/RpcService

Parameter Type Description
args object

Takes a number of properties as kwArgs for defining the service. It also accepts a string. When passed a string, it is treated as a url from which it should synchronously retrieve an smd file. Otherwise it is a kwArgs object. It accepts serviceUrl, to manually define a url for the rpc service allowing the rpc system to be used without an smd definition. strictArgChecks forces the system to verify that the # of arguments provided in a call matches those defined in the smd. smdString allows a developer to pass a jsonString directly, which will be converted into an object or alternatively smdObject is accepts an smdObject directly.

See the dojo/rpc/RpcService reference documentation for more information.

Properties

serviceUrl

Defined by: dojo/rpc/RpcService

strictArgChecks

Defined by: dojo/rpc/RpcService

Methods

errorCallback(deferredRequestHandler)

Defined by dojo/rpc/RpcService

create callback that calls the Deferred errback method

Parameter Type Description
deferredRequestHandler dojo/_base/Deferred

The deferred object handling a request.

Returns: function

generateMethod(method,parameters,url)

Defined by dojo/rpc/RpcService

generate the local bind methods for the remote object

Parameter Type Description
method string

The name of the method we are generating

parameters dojo/_base/array

the array of parameters for this call.

url string

the service url for this call

Returns: undefined

parseResults(obj)

Defined by dojo/rpc/RpcService

parse the results coming back from an rpc request. this base implementation, just returns the full object subclasses should parse and only return the actual results

Parameter Type Description
obj Object

Object that is the return results from an rpc request

Returns: Object

Object that is the return results from an rpc request

processSmd(object)

Defined by dojo/rpc/RpcService

callback method for receipt of a smd object. Parse the smd and generate functions based on the description

Parameter Type Description
object undefined

smd object defining this service.

resultCallback(deferredRequestHandler)

Defined by dojo/rpc/RpcService

create callback that calls the Deferred's callback method

Parameter Type Description
deferredRequestHandler dojo/_base/Deferred

The deferred object handling a request.

Returns: undefined

© 2005–2015 The Dojo Foundation
Licensed under the AFL 2.1 and BSD 3-Clause licenses.
http://dojotoolkit.org/api/1.10/dojo/rpc/RpcService.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部