# Yahoo! UI Library

### datasource 3.0.0b1

Yahoo! UI Library > datasource > Pollable
Search:
Filters Show Private Show Protected Show Deprecated

## Class Pollable - extends DataSource.Local

Adds polling to the DataSource Utility.

### Properties

#### _intervals - `private object`

Hash of polling interval IDs that have been enabled, stored here to be able to clear all intervals.

#### Properties inherited from Attribute:

``

#### Properties inherited from Base:

`name`

#### Properties inherited from DataSource.Local:

``

### Methods

#### clearAllIntervals

`void clearAllIntervals ( )`
Clears all intervals.

Returns: `void`

#### clearInterval

`void clearInterval ( id )`
Disables polling mechanism associated with the given interval ID.

Parameters:
  `id <Number>` Interval ID.

Returns: `void`

#### setInterval

`Number setInterval ( msec , request , callback )`
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>` Request object.
  `callback <Object>` 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 that will be passed back to the success and failure handlers.

Returns: `Number`
  Interval ID.

#### Methods inherited from EventTarget:

`_getType, _parseType, addTarget, after, before, bubble, detach, detachAll, fire, getEvent, on, publish, removeTarget, subscribe, unsubscribe, unsubscribeAll`

#### Methods inherited from Attribute:

`_addAttrs, _addLazyAttr, _defAttrChangeFn, _fireAttrChange, _getAttrInitVal, _isLazyAttr, _set, _setAttr, _setAttrVal, _splitAttrVals, addAttr, addAttrs, attrAdded, get, getAttrs, modifyAttr, removeAttr, reset, set, setAttrs`

#### Methods inherited from Plugin.Host:

`_destroyPlugins, _initPlugins, _plug, _unplug, hasPlugin, plug, unplug`

#### Methods inherited from Base:

`_aggregateAttrs, _defDestroyFn, _defInitFn, _destroyHierarchy, _filterAttrCfs, _getAttrCfgs, _getClasses, _initHierarchy, _initHierarchyData, destroy, init, toString`

#### Methods inherited from DataSource.Local:

`_defDataFn, _defRequestFn, _defResponseFn, _initEvents, initializer, sendRequest`

#### Events inherited from Base:

`destroy, destroyedChange, init, initializedChange,`

#### Events inherited from DataSource.Local:

`data, error, request response sourceChange`

#### Configuration attributes inherited from Base:

`destroyed, initialized,`

#### Configuration attributes inherited from DataSource.Local:

`source,`

Copyright © 2009 Yahoo! Inc. All rights reserved.