dojo/rpc/JsonpService (version 1.10)

dojo/rpc/RpcService

Summary

Generic JSONP service. Minimally extends RpcService to allow easy definition of nearly any JSONP style service. Example SMD files exist in dojox.data

Usage

var foo = new JsonpService(args,requiredArgs);
dojo/rpc/JsonpService
Parameter Type Description
args undefined
requiredArgs undefined

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

Property Summary

Method Summary

  • bind(method,parameters,deferredRequestHandler,url) JSONP bind method.
  • createRequest(parameters) create a JSONP req
  • errorCallback(deferredRequestHandler) create callback that calls the Deferred errback method
  • generateMethod(method,parameters,url) generate the local bind methods for the remote object
  • parseResults(obj) 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
  • processSmd(object) callback method for receipt of a smd object.
  • resultCallback(deferredRequestHandler) create callback that calls the Deferred's callback method

Properties

serviceUrl
Defined by: dojo/rpc/RpcService
strictArgChecks
Defined by: dojo/rpc/JsonpService

Methods

bind(method,parameters,deferredRequestHandler,url)

JSONP bind method. Takes remote method, parameters, deferred, and a url, calls createRequest to make a JSON-RPC envelope and passes that off with bind.

Parameter Type Description
method string

The name of the method we are calling

parameters dojo/_base/array

The parameters we are passing off to the method

deferredRequestHandler deferred

The Deferred object for this particular request

url undefined
createRequest(parameters)

create a JSONP req

Parameter Type Description
parameters undefined
Returns:object
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
Error in the documentation? Can’t find what you are looking for? Let us know!