Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/cometd/RestChannels.js

  • Provides:

    • dojox.cometd.RestChannels
  • Requires:

    • dojox.rpc.Client in common
  • dojox.cometd.RestChannels

    • type
      Function
    • parameters:
      • options: (typeof Keyword)
        arguments:
        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.
    • summary
      Initiates the REST Channels protocol
  • dojox.cometd.RestChannels.constructor

    • constructor - constructor
    • type
      Function
    • parameters:
      • options: (typeof Keyword)
        arguments:
        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.
    • summary
      Initiates the REST Channels protocol
  • dojox.cometd.RestChannels.absoluteUrl

    • parameters:
      • baseUrl
      • relativeUrl
    • type
      Function
  • dojox.cometd.RestChannels.acceptType

    • type
      String
  • dojox.cometd.RestChannels.subscriptions

    • type
      Object
  • dojox.cometd.RestChannels.subCallbacks

    • type
      Object
  • dojox.cometd.RestChannels.autoReconnectTime

    • type
      Number
  • dojox.cometd.RestChannels.reloadDataOnReconnect

    • type
      Object
  • dojox.cometd.RestChannels.sendAsJson

    • type
      bool
  • dojox.cometd.RestChannels.url

    • type
      String
  • dojox.cometd.RestChannels.autoSubscribeRoot

    • type
      String
  • dojox.cometd.RestChannels.open

    • returns
      this can be called after dojo is unloaded, just do nothing in that case
    • summary
      Startup the transport (connect to the "channels" resource to receive updates from the server).
    • description
      Note that if there is no connection open, this is automatically called when you do a subscription,
      it is often not necessary to call this
    • type
      Function
  • dojox.cometd.RestChannels.started

    • type
      bool
  • dojox.cometd.RestChannels.connectionId

  • dojox.cometd.RestChannels.createdClientId

    • type
      Object
  • dojox.cometd.RestChannels.lastIndex

    • type
      Number
  • dojox.cometd.RestChannels.connected

    • type
      bool
  • dojox.cometd.RestChannels._send

    • parameters:
      • method
      • args
      • data
    • type
      Function
  • dojox.cometd.RestChannels.subscribe

    • parameters:
      • channel: (typeof String)
        the uri for the resource you want to monitor
      • args: (typeof dojo.__XhrArgs)
        See dojo.xhr
        
        headers:
        These are the headers to be applied to the channel subscription request
        
        callback:
        This will be called when a event occurs for the channel
        The callback will be called with a single argument:
        	callback(message)
        where message is an object that follows the XHR API:
        status : Http status
        statusText : Http status text
        getAllResponseHeaders() : The response headers
        getResponseHeaders(headerName) : Retrieve a header by name
        responseText : The response body as text
        with the following additional Bayeux properties
        data : The response body as JSON
        channel : The channel/url of the response
    • returns
      don't process the response, the response will be received in the main channels response
    • summary
      Subscribes to a channel/uri, and returns a dojo.Deferred object for the response from
      the subscription request
    • type
      Function
  • dojox.cometd.RestChannels.publish

    • parameters:
      • channel: (typeof Channel/resource)
        path to publish to
      • data: (typeof data)
        to publish
    • summary
      Publish an event.
    • description
      This does a simple POST operation to the provided URL,
      POST is the semantic equivalent of publishing a message within REST/Channels
    • type
      Function
  • dojox.cometd.RestChannels._processMessage

    • parameters:
      • message
    • returns
      indicate an error
    • type
      Function
  • dojox.cometd.RestChannels.onprogress

    • parameters:
      • xhr
      • data
      • contentType
    • type
      Function
  • dojox.cometd.RestChannels.get

    • parameters:
      • channel: (typeof String)
      • args: (typeof dojo.__XhrArgs)
    • summary
      GET the initial value of the resource and subscribe to it
      See subscribe for parameter values
    • type
      Function
  • dojox.cometd.RestChannels.receive

    • parameters:
      • message: (typeof A)
        cometd/XHR message
    • summary
      Called when a message is received from the server
    • type
      Function
  • dojox.cometd.RestChannels.disconnected

    • summary
      called when our channel gets disconnected
    • type
      Function
  • dojox.cometd.RestChannels.unsubscribe

    • parameters:
      • channel: (typeof String)
      • args: (typeof dojo.__XhrArgs)
    • summary
      unsubscribes from the resource
      See subscribe for parameter values
    • type
      Function
  • dojox.cometd.RestChannels.disconnect

    • summary
      disconnect from the server
    • type
      Function
  • dojox.cometd.RestChannels.defaultInstance

    • type
      Object
  • dojox.cometd

    • type
      Object
  • dojox

    • type
      Object