3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>The source code</title>
5 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
6 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8 <body onload="prettyPrint();">
9 <pre class="prettyprint lang-js">/*!
10 * Ext JS Library 3.2.1
11 * Copyright(c) 2006-2010 Ext JS, Inc.
13 * http://www.extjs.com/license
15 <div id="cls-Ext.direct.Provider"></div>/**
16 * @class Ext.direct.Provider
17 * @extends Ext.util.Observable
18 * <p>Ext.direct.Provider is an abstract class meant to be extended.</p>
20 * <p>For example ExtJs implements the following subclasses:</p>
24 +---{@link Ext.direct.JsonProvider JsonProvider}
26 +---{@link Ext.direct.PollingProvider PollingProvider}
28 +---{@link Ext.direct.RemotingProvider RemotingProvider}
32 Ext.direct.Provider = Ext.extend(Ext.util.Observable, {
33 <div id="cfg-Ext.direct.Provider-id"></div>/**
35 * The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
36 * You should assign an id if you need to be able to access the provider later and you do
37 * not have an object reference available, for example:
39 Ext.Direct.addProvider(
47 var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}('poll-provider');
52 <div id="cfg-Ext.direct.Provider-priority"></div>/**
53 * @cfg {Number} priority
54 * Priority of the request. Lower is higher priority, <tt>0</tt> means "duplex" (always on).
55 * All Providers default to <tt>1</tt> except for PollingProvider which defaults to <tt>3</tt>.
59 <div id="cfg-Ext.direct.Provider-type"></div>/**
61 * <b>Required</b>, <tt>undefined</tt> by default. The <tt>type</tt> of provider specified
62 * to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a
63 * new Provider. Acceptable values by default are:<div class="mdetail-params"><ul>
64 * <li><b><tt>polling</tt></b> : {@link Ext.direct.PollingProvider PollingProvider}</li>
65 * <li><b><tt>remoting</tt></b> : {@link Ext.direct.RemotingProvider RemotingProvider}</li>
70 constructor : function(config){
71 Ext.apply(this, config);
73 <div id="event-Ext.direct.Provider-connect"></div>/**
75 * Fires when the Provider connects to the server-side
76 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
79 <div id="event-Ext.direct.Provider-disconnect"></div>/**
81 * Fires when the Provider disconnects from the server-side
82 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
85 <div id="event-Ext.direct.Provider-data"></div>/**
87 * Fires when the Provider receives data from the server-side
88 * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
89 * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
92 <div id="event-Ext.direct.Provider-exception"></div>/**
94 * Fires when the Provider receives an exception from the server-side
98 Ext.direct.Provider.superclass.constructor.call(this, config);
101 <div id="method-Ext.direct.Provider-isConnected"></div>/**
102 * Returns whether or not the server-side is currently connected.
103 * Abstract method for subclasses to implement.
105 isConnected: function(){
109 <div id="prop-Ext.direct.Provider-connect"></div>/**
110 * Abstract methods for subclasses to implement.
112 connect: Ext.emptyFn,
114 <div id="prop-Ext.direct.Provider-disconnect"></div>/**
115 * Abstract methods for subclasses to implement.
117 disconnect: Ext.emptyFn