3 This file is part of Ext JS 4
5 Copyright (c) 2011 Sencha Inc
7 Contact: http://www.sencha.com/contact
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
16 * @class Ext.direct.Provider
17 * <p>Ext.direct.Provider is an abstract class meant to be extended.</p>
19 * <p>For example Ext JS implements the following subclasses:</p>
23 +---{@link Ext.direct.JsonProvider JsonProvider}
25 +---{@link Ext.direct.PollingProvider PollingProvider}
27 +---{@link Ext.direct.RemotingProvider RemotingProvider}
31 Ext.define('Ext.direct.Provider', {
33 /* Begin Definitions */
35 alias: 'direct.provider',
38 observable: 'Ext.util.Observable'
45 * The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
46 * You should assign an id if you need to be able to access the provider later and you do
47 * not have an object reference available, for example:
49 Ext.direct.Manager.addProvider({
54 var p = {@link Ext.direct.Manager}.{@link Ext.direct.Manager#getProvider getProvider}('poll-provider');
59 constructor : function(config){
62 Ext.apply(me, config);
66 * Fires when the Provider connects to the server-side
67 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
72 * Fires when the Provider disconnects from the server-side
73 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
78 * Fires when the Provider receives data from the server-side
79 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
80 * @param {Ext.direct.Event} e The Ext.direct.Event type that occurred.
85 * Fires when the Provider receives an exception from the server-side
89 me.mixins.observable.constructor.call(me, config);
93 * Returns whether or not the server-side is currently connected.
94 * Abstract method for subclasses to implement.
96 isConnected: function(){
101 * Abstract methods for subclasses to implement.
104 connect: Ext.emptyFn,
107 * Abstract methods for subclasses to implement.
110 disconnect: Ext.emptyFn