Properties Methods Events Config Options Direct Link
Observable
  Provider
    JsonProvider
      PollingProvider

Class Ext.direct.PollingProvider

Package:Ext.direct
Defined In:PollingProvider.js
Class:PollingProvider
Extends:JsonProvider

Provides for repetitive polling of the server at distinct intervals. The initial request for data originates from the client, and then is responded to by the server.

All configurations for the PollingProvider should be generated by the server-side API portion of the Ext.Direct stack.

An instance of PollingProvider may be created directly via the new keyword or by simply specifying type = 'polling'. For example:

var pollA = new Ext.direct.PollingProvider({
    type:'polling',
    url: 'php/pollA.php',
});
Ext.Direct.addProvider(pollA);
pollA.disconnect();

Ext.Direct.addProvider(
    {
        type:'polling',
        url: 'php/pollB.php',
        id: 'pollB-provider'
    }
);
var pollB = Ext.Direct.getProvider('pollB-provider');

Config Options

Config OptionsDefined By
 baseParams : Object
An object containing properties which are to be sent as parameters on every polling request
PollingProvider
 interval : Number
How often to poll the server-side in milliseconds (defaults to 3000 - every 3 seconds).
PollingProvider
 priority : Number
Priority of the request (defaults to 3). See Ext.direct.Provider.priority.
PollingProvider

Public Properties

PropertyDefined By
 connect : Object
Abstract methods for subclasses to implement.
Provider
 disconnect : Object
Abstract methods for subclasses to implement.
Provider

Public Methods

MethodDefined By

Public Events

EventDefined By