1 <!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-direct.Provider'>/**
2 </span> * @class Ext.direct.Provider
3 * <p>Ext.direct.Provider is an abstract class meant to be extended.</p>
5 * <p>For example ExtJs implements the following subclasses:</p>
6 * <pre><code>
9 +---{@link Ext.direct.JsonProvider JsonProvider}
11 +---{@link Ext.direct.PollingProvider PollingProvider}
13 +---{@link Ext.direct.RemotingProvider RemotingProvider}
14 * </code></pre>
17 Ext.define('Ext.direct.Provider', {
19 /* Begin Definitions */
21 alias: 'direct.provider',
24 observable: 'Ext.util.Observable'
29 <span id='Ext-direct.Provider-cfg-id'> /**
30 </span> * @cfg {String} id
31 * The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
32 * You should assign an id if you need to be able to access the provider later and you do
33 * not have an object reference available, for example:
34 * <pre><code>
35 Ext.direct.Manager.addProvider({
40 var p = {@link Ext.direct.Manager}.{@link Ext.direct.Manager#getProvider getProvider}('poll-provider');
42 * </code></pre>
45 constructor : function(config){
48 Ext.apply(me, config);
50 <span id='Ext-direct.Provider-event-connect'> /**
51 </span> * @event connect
52 * Fires when the Provider connects to the server-side
53 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
56 <span id='Ext-direct.Provider-event-disconnect'> /**
57 </span> * @event disconnect
58 * Fires when the Provider disconnects from the server-side
59 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
62 <span id='Ext-direct.Provider-event-data'> /**
64 * Fires when the Provider receives data from the server-side
65 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
66 * @param {event} e The Ext.Direct.Event type that occurred.
69 <span id='Ext-direct.Provider-event-exception'> /**
70 </span> * @event exception
71 * Fires when the Provider receives an exception from the server-side
75 me.mixins.observable.constructor.call(me, config);
78 <span id='Ext-direct.Provider-method-isConnected'> /**
79 </span> * Returns whether or not the server-side is currently connected.
80 * Abstract method for subclasses to implement.
82 isConnected: function(){
86 <span id='Ext-direct.Provider-property-connect'> /**
87 </span> * Abstract methods for subclasses to implement.
91 <span id='Ext-direct.Provider-property-disconnect'> /**
92 </span> * Abstract methods for subclasses to implement.
94 disconnect: Ext.emptyFn
96 </pre></pre></body></html>