datasource-polling.js revision aa654579cf9c3726db8672b7f090467332fc1ad6
550N/A * Extends DataSource with polling functionality. 550N/A * @submodule datasource-polling 550N/A * Adds polling to the YUI DataSource utility. 550N/A * @extends DataSource.Local 550N/A * @description Array of polling interval IDs that have been enabled, 550N/A * stored here to be able to clear all intervals. 550N/A * Sets up a polling mechanism to send requests at set intervals and forward 550N/A * responses to given callback. 550N/A * @param msec {Number} Length of interval in milliseconds. 550N/A * @param request {Object} Request object. 550N/A * @param callback {Object} An object literal with the following properties: 550N/A * <dt><code>success</code></dt> 550N/A * <dd>The function to call when the data is ready.</dd> 550N/A * <dt><code>failure</code></dt> 550N/A * <dd>The function to call upon a response failure condition.</dd> 550N/A * <dt><code>scope</code></dt> 550N/A * <dd>The object to serve as the scope for the success and failure handlers.</dd> 550N/A * <dt><code>argument</code></dt> 550N/A * <dd>Arbitrary data that will be passed back to the success and failure handlers.</dd> 550N/A * @return {Number} Interval ID. 550N/A //self._makeConnection(request, callback); 550N/A * Disables polling mechanism associated with the given interval ID. 550N/A * @method clearInterval 550N/A * @param id {Number} Interval ID. 550N/A // Remove from tracker if there 550N/A * Clears all intervals. 550N/A * @method clearAllIntervals