Adds polling to the DataSource Utility.
Properties
Hash of polling interval IDs that have been enabled,
stored here to be able to clear all intervals.
Properties inherited from Base:
Methods
void
clearAllIntervals
(
)
Clears all intervals.
void
clearInterval
(
id
)
Disables polling mechanism associated with the given interval ID.
- Parameters:
-
id
<Number>
Interval ID.
Number
setInterval
(
msec
,
request
)
Sets up a polling mechanism to send requests at set intervals and
forward responses to given callback.
- Parameters:
-
msec
<Number>
Length of interval in milliseconds.
-
request
<Object>
An object literal with the following properties:
request
- The request to send to the live data source, if any.
callback
- An object literal with the following properties:
success
- The function to call when the data is ready.
failure
- The function to call upon a response failure condition.
argument
- Arbitrary data payload that will be passed back to the success and failure handlers.
cfg
- Configuration object, if any.
- Returns:
Number
- Interval ID.
Methods inherited from EventTarget:
_getType,
_monitor,
_parseType,
addTarget,
after,
before,
bubble,
detach,
detachAll,
fire,
getEvent,
getTargets,
on,
once,
publish,
removeTarget,
subscribe,
unsubscribe,
unsubscribeAll
Methods inherited from Attribute:
_addAttrs,
_addLazyAttr,
_defAttrChangeFn,
_fireAttrChange,
_getAttr,
_getAttrCfg,
_getAttrInitVal,
_getAttrs,
_getStateVal,
_isLazyAttr,
_normAttrVals,
_protectAttrs,
_set,
_setAttr,
_setAttrs,
_setAttrVal,
_setStateVal,
addAttr,
addAttrs,
attrAdded,
get,
getAttrs,
modifyAttr,
removeAttr,
reset,
set,
setAttrs
Methods inherited from Base:
_aggregateAttrs,
_defDestroyFn,
_defInitFn,
_destroyHierarchy,
_filterAttrCfs,
_getAttrCfgs,
_getClasses,
_initHierarchy,
_initHierarchyData,
_preInitEventCfg,
destroy,
init,
toString
Events inherited from Base:
Configuration attributes inherited from Base: