ObservableProvider
| Package: | CQ.Ext.direct |
| Class: | Provider |
| Subclasses: | JsonProvider |
| Extends: | CQ.Ext.util.Observable |
| Clientlib: | cq.widgets |
CQ.Ext.direct.Provider is an abstract class meant to be extended.
For example ExtJs implements the following subclasses:
Provider
|
+---JsonProvider
|
+---PollingProvider
|
+---RemotingProvider
@abstract | Config Options | Defined By | |
|---|---|---|
|
id : String The unique id of the provider (defaults to an auto-assigned id). You should assign an id if you need to be able to ac...
The unique id of the provider (defaults to an 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:
|
Provider | |
|
priority : Number Priority of the request. Lower is higher priority, 0 means "duplex" (always on). All Providers default to 1 except fo...
Priority of the request. Lower is higher priority, 0 means "duplex" (always on). All Providers default to 1 except for PollingProvider which defaults to 3.
|
Provider | |
|
type : String Required, undefined by default. The type of provider specified to CQ.Ext.Direct.addProvider to create a new Provider....
Required, undefined by default. The type of provider specified to CQ.Ext.Direct.addProvider to create a new Provider. Acceptable values by default are:
|
Provider | |
| Property | Defined By | |
|---|---|---|
|
connect : Object
Abstract methods for subclasses to implement.
|
Provider | |
|
disconnect : Object
Abstract methods for subclasses to implement.
|
Provider | |
| Method | Defined By | |
|---|---|---|
enableBubble( String/Array events ) : void Enables events fired by this Observable to bubble up an owner hierarchy by calling
this.getBubbleTarget() if present....
Enables events fired by this Observable to bubble up an owner hierarchy by calling
This is commonly used by CQ.Ext.Components to bubble events to owner Containers. See CQ.Ext.Component.getBubbleTarget. The default implementation in CQ.Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to access the required target more quickly. Example:
Parameters:
|
Observable | |
|
isConnected() : void Returns whether or not the server-side is currently connected.
Abstract method for subclasses to implement.
Returns whether or not the server-side is currently connected.
Abstract method for subclasses to implement.
Parameters:
|
Provider | |
relayEvents( Object o, Array events ) : void Relays selected events from the specified Observable as if the events were fired by this.
Relays selected events from the specified Observable as if the events were fired by this.
Parameters:
|
Observable | |
| Event | Defined By | |
|---|---|---|
connect : ( CQ.Ext.direct.Provider provider ) Fires when the Provider connects to the server-side
Fires when the Provider connects to the server-side
Listeners will be called with the following arguments:
|
Provider | |
data : ( CQ.Ext.direct.Provider provider, event e ) Fires when the Provider receives data from the server-side
Fires when the Provider receives data from the server-side
Listeners will be called with the following arguments:
|
Provider | |
disconnect : ( CQ.Ext.direct.Provider provider ) Fires when the Provider disconnects from the server-side
Fires when the Provider disconnects from the server-side
Listeners will be called with the following arguments:
|
Provider | |
|
exception : () Fires when the Provider receives an exception from the server-side
Fires when the Provider receives an exception from the server-side
Listeners will be called with the following arguments:
|
Provider | |