3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\r
4 <title>The source code</title>
\r
5 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
\r
6 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
\r
8 <body onload="prettyPrint();">
\r
9 <pre class="prettyprint lang-js"><div id="cls-Ext.direct.Provider"></div>/**
\r
10 * @class Ext.direct.Provider
\r
11 * @extends Ext.util.Observable
\r
12 * <p>Ext.direct.Provider is an abstract class meant to be extended.</p>
\r
14 * <p>For example ExtJs implements the following subclasses:</p>
\r
18 +---{@link Ext.direct.JsonProvider JsonProvider}
\r
20 +---{@link Ext.direct.PollingProvider PollingProvider}
\r
22 +---{@link Ext.direct.RemotingProvider RemotingProvider}
\r
26 Ext.direct.Provider = Ext.extend(Ext.util.Observable, {
\r
27 <div id="cfg-Ext.direct.Provider-id"></div>/**
\r
29 * The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
\r
30 * You should assign an id if you need to be able to access the provider later and you do
\r
31 * not have an object reference available, for example:
\r
33 Ext.Direct.addProvider(
\r
36 url: 'php/poll.php',
\r
41 var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}('poll-provider');
\r
46 <div id="cfg-Ext.direct.Provider-priority"></div>/**
\r
47 * @cfg {Number} priority
\r
48 * Priority of the request. Lower is higher priority, <tt>0</tt> means "duplex" (always on).
\r
49 * All Providers default to <tt>1</tt> except for PollingProvider which defaults to <tt>3</tt>.
\r
53 <div id="cfg-Ext.direct.Provider-type"></div>/**
\r
54 * @cfg {String} type
\r
55 * <b>Required</b>, <tt>undefined</tt> by default. The <tt>type</tt> of provider specified
\r
56 * to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a
\r
57 * new Provider. Acceptable values by default are:<div class="mdetail-params"><ul>
\r
58 * <li><b><tt>polling</tt></b> : {@link Ext.direct.PollingProvider PollingProvider}</li>
\r
59 * <li><b><tt>remoting</tt></b> : {@link Ext.direct.RemotingProvider RemotingProvider}</li>
\r
64 constructor : function(config){
\r
65 Ext.apply(this, config);
\r
67 <div id="event-Ext.direct.Provider-connect"></div>/**
\r
69 * Fires when the Provider connects to the server-side
\r
70 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
\r
73 <div id="event-Ext.direct.Provider-disconnect"></div>/**
\r
75 * Fires when the Provider disconnects from the server-side
\r
76 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
\r
79 <div id="event-Ext.direct.Provider-data"></div>/**
\r
81 * Fires when the Provider receives data from the server-side
\r
82 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
\r
83 * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
\r
86 <div id="event-Ext.direct.Provider-exception"></div>/**
\r
88 * Fires when the Provider receives an exception from the server-side
\r
92 Ext.direct.Provider.superclass.constructor.call(this, config);
\r
95 <div id="method-Ext.direct.Provider-isConnected"></div>/**
\r
96 * Returns whether or not the server-side is currently connected.
\r
97 * Abstract method for subclasses to implement.
\r
99 isConnected: function(){
\r
103 <div id="prop-Ext.direct.Provider-connect"></div>/**
\r
104 * Abstract methods for subclasses to implement.
\r
106 connect: Ext.emptyFn,
\r
108 <div id="prop-Ext.direct.Provider-disconnect"></div>/**
\r
109 * Abstract methods for subclasses to implement.
\r
111 disconnect: Ext.emptyFn
\r