Login Register Help
API Documentation
Choose a stylesheet:

Constructordojox.cometd.RestChannels

dojo.require("dojox.cometd.RestChannels");
Initiates the REST Channels protocol

Usage

var foo=new dojox.cometd.RestChannels(options: Keyword);
parametertypedescription
optionsKeywordarguments: The *autoSubscribeRoot* parameter: When this is set, all REST service requests that have this prefix will be auto-subscribed. The default is '/' (all REST requests). The *url* parameter: This is the url to connect to for server-sent messages. The default is "/channels". The *autoReconnectTime* parameter: This is amount time to wait to reconnect with a connection is broken The *reloadDataOnReconnect* parameter: This indicates whether RestChannels should re-download data when a connection is restored (value of true), or if it should re-subscribe with retroactive subscriptions (Subscribe-Since header) using HEAD requests (value of false). The default is true.

Jump to PropertiesFunctionsBack to top

FunctionabsoluteUrl(baseUrl, relativeUrl)
Functionconstructor(options: Keyword)
Initiates the REST Channels protocol
disconnect from the server
called when our channel gets disconnected
Functionget(channel: String, args: dojo.__XhrArgs?)
GET the initial value of the resource and subscribe to it See subscribe for parameter values
Functiononprogress(xhr, data, contentType)
Functionopen(): this can be called after dojo is unloaded, just do nothing in that case
Startup the transport (connect to the "channels" resource to receive updates from the server).
Functionpublish(channel: Channel/resource, data: data)
Publish an event.
Functionreceive(message: A)
Called when a message is received from the server
Functionsubscribe(channel: String, args: dojo.__XhrArgs?): don't process the response, the response will be received in the main channels response
Subscribes to a channel/uri, and returns a dojo.Deferred object for the response from the subscription request
unsubscribes from the resource See subscribe for parameter values
Function_processMessage(message): indicate an error
Function_send(method, args, data)

Jump to FunctionsPropertiesBack to top