Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / docs / source / Provider.html
index c5bccb1..2697374 100644 (file)
-<html>\r
-<head>\r
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    \r
-  <title>The source code</title>\r
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body  onload="prettyPrint();">\r
-    <pre class="prettyprint lang-js"><div id="cls-Ext.direct.Provider"></div>/**\r
- * @class Ext.direct.Provider\r
- * @extends Ext.util.Observable\r
- * <p>Ext.direct.Provider is an abstract class meant to be extended.</p>\r
- * \r
- * <p>For example ExtJs implements the following subclasses:</p>\r
- * <pre><code>\r
-Provider\r
-|\r
-+---{@link Ext.direct.JsonProvider JsonProvider} \r
-    |\r
-    +---{@link Ext.direct.PollingProvider PollingProvider}   \r
-    |\r
-    +---{@link Ext.direct.RemotingProvider RemotingProvider}   \r
- * </code></pre>\r
- * @abstract\r
- */\r
-Ext.direct.Provider = Ext.extend(Ext.util.Observable, {    \r
-    <div id="cfg-Ext.direct.Provider-id"></div>/**\r
-     * @cfg {String} id\r
-     * The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).\r
-     * You should assign an id if you need to be able to access the provider later and you do\r
-     * not have an object reference available, for example:\r
-     * <pre><code>\r
-Ext.Direct.addProvider(\r
-    {\r
-        type: 'polling',\r
-        url:  'php/poll.php',\r
-        id:   'poll-provider'\r
-    }\r
-);\r
-     \r
-var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}('poll-provider');\r
-p.disconnect();\r
-     * </code></pre>\r
-     */\r
-        \r
-    <div id="cfg-Ext.direct.Provider-priority"></div>/**\r
-     * @cfg {Number} priority\r
-     * Priority of the request. Lower is higher priority, <tt>0</tt> means "duplex" (always on).\r
-     * All Providers default to <tt>1</tt> except for PollingProvider which defaults to <tt>3</tt>.\r
-     */    \r
-    priority: 1,\r
-\r
-    <div id="cfg-Ext.direct.Provider-type"></div>/**\r
-     * @cfg {String} type\r
-     * <b>Required</b>, <tt>undefined</tt> by default.  The <tt>type</tt> of provider specified\r
-     * to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a\r
-     * new Provider. Acceptable values by default are:<div class="mdetail-params"><ul>\r
-     * <li><b><tt>polling</tt></b> : {@link Ext.direct.PollingProvider PollingProvider}</li>\r
-     * <li><b><tt>remoting</tt></b> : {@link Ext.direct.RemotingProvider RemotingProvider}</li>\r
-     * </ul></div>\r
-     */    \r
\r
-    // private\r
-    constructor : function(config){\r
-        Ext.apply(this, config);\r
-        this.addEvents(\r
-            <div id="event-Ext.direct.Provider-connect"></div>/**\r
-             * @event connect\r
-             * Fires when the Provider connects to the server-side\r
-             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.\r
-             */            \r
-            'connect',\r
-            <div id="event-Ext.direct.Provider-disconnect"></div>/**\r
-             * @event disconnect\r
-             * Fires when the Provider disconnects from the server-side\r
-             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.\r
-             */            \r
-            'disconnect',\r
-            <div id="event-Ext.direct.Provider-data"></div>/**\r
-             * @event data\r
-             * Fires when the Provider receives data from the server-side\r
-             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.\r
-             * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.\r
-             */            \r
-            'data',\r
-            <div id="event-Ext.direct.Provider-exception"></div>/**\r
-             * @event exception\r
-             * Fires when the Provider receives an exception from the server-side\r
-             */                        \r
-            'exception'\r
-        );\r
-        Ext.direct.Provider.superclass.constructor.call(this, config);\r
-    },\r
-\r
-    <div id="method-Ext.direct.Provider-isConnected"></div>/**\r
-     * Returns whether or not the server-side is currently connected.\r
-     * Abstract method for subclasses to implement.\r
-     */\r
-    isConnected: function(){\r
-        return false;\r
-    },\r
-\r
-    <div id="prop-Ext.direct.Provider-connect"></div>/**\r
-     * Abstract methods for subclasses to implement.\r
-     */\r
-    connect: Ext.emptyFn,\r
-    \r
-    <div id="prop-Ext.direct.Provider-disconnect"></div>/**\r
-     * Abstract methods for subclasses to implement.\r
-     */\r
-    disconnect: Ext.emptyFn\r
-});\r
-</pre>    \r
-</body>\r
-</html>
\ No newline at end of file
+<!DOCTYPE html>
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>The source code</title>
+  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+  <style type="text/css">
+    .highlight { display: block; background-color: #ddd; }
+  </style>
+  <script type="text/javascript">
+    function highlight() {
+      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
+    }
+  </script>
+</head>
+<body onload="prettyPrint(); highlight();">
+  <pre class="prettyprint lang-js"><span id='Ext-direct-Provider'>/**
+</span> * @class Ext.direct.Provider
+ * &lt;p&gt;Ext.direct.Provider is an abstract class meant to be extended.&lt;/p&gt;
+ *
+ * &lt;p&gt;For example Ext JS implements the following subclasses:&lt;/p&gt;
+ * &lt;pre&gt;&lt;code&gt;
+Provider
+|
++---{@link Ext.direct.JsonProvider JsonProvider}
+    |
+    +---{@link Ext.direct.PollingProvider PollingProvider}
+    |
+    +---{@link Ext.direct.RemotingProvider RemotingProvider}
+ * &lt;/code&gt;&lt;/pre&gt;
+ * @abstract
+ */
+Ext.define('Ext.direct.Provider', {
+
+    /* Begin Definitions */
+
+   alias: 'direct.provider',
+
+    mixins: {
+        observable: 'Ext.util.Observable'
+    },
+
+    /* End Definitions */
+
+<span id='Ext-direct-Provider-cfg-id'>   /**
+</span>     * @cfg {String} id
+     * The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
+     * You should assign an id if you need to be able to access the provider later and you do
+     * not have an object reference available, for example:
+     * &lt;pre&gt;&lt;code&gt;
+Ext.direct.Manager.addProvider({
+    type: 'polling',
+    url:  'php/poll.php',
+    id:   'poll-provider'
+});
+var p = {@link Ext.direct.Manager}.{@link Ext.direct.Manager#getProvider getProvider}('poll-provider');
+p.disconnect();
+     * &lt;/code&gt;&lt;/pre&gt;
+     */
+
+    constructor : function(config){
+        var me = this;
+
+        Ext.apply(me, config);
+        me.addEvents(
+<span id='Ext-direct-Provider-event-connect'>            /**
+</span>             * @event connect
+             * Fires when the Provider connects to the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             */
+            'connect',
+<span id='Ext-direct-Provider-event-disconnect'>            /**
+</span>             * @event disconnect
+             * Fires when the Provider disconnects from the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             */
+            'disconnect',
+<span id='Ext-direct-Provider-event-data'>            /**
+</span>             * @event data
+             * Fires when the Provider receives data from the server-side
+             * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
+             * @param {Ext.direct.Event} e The Ext.direct.Event type that occurred.
+             */
+            'data',
+<span id='Ext-direct-Provider-event-exception'>            /**
+</span>             * @event exception
+             * Fires when the Provider receives an exception from the server-side
+             */
+            'exception'
+        );
+        me.mixins.observable.constructor.call(me, config);
+    },
+
+<span id='Ext-direct-Provider-method-isConnected'>    /**
+</span>     * Returns whether or not the server-side is currently connected.
+     * Abstract method for subclasses to implement.
+     */
+    isConnected: function(){
+        return false;
+    },
+
+<span id='Ext-direct-Provider-method-connect'>    /**
+</span>     * Abstract methods for subclasses to implement.
+     * @method
+     */
+    connect: Ext.emptyFn,
+
+<span id='Ext-direct-Provider-method-disconnect'>    /**
+</span>     * Abstract methods for subclasses to implement.
+     * @method
+     */
+    disconnect: Ext.emptyFn
+});
+</pre>
+</body>
+</html>