Class o2.AjaxState

Implements Observable

A Model for the available AjaxController objects.

Implements the Observable interface.

See http://download.oracle.com/javase/1.4.2/docs/api/java/util/Observable.html

Direct Known Subclasses:

static class o2.AjaxState
Defined in ajaxstate

Property Summary
protected readonly Array observers

A collection of the registered Observers.

Function Summary
protected static addObserver (Object observer)

An implementation of the Observer.addObserver method.

Registers an Observer.

This method is protected, in a sense that it's not meant to be called directly. o2.AjaxController and o2.JsonpController use it indirectly to register themselves.

static countObservers()

An implementation of the Observer.countObservers method.

Gets the Observer count.

Usage example:

 var count = o2.AjaxState.countObservers();
 
protected static deleteObserver (Object observer)

An implementation of the Observer.deleteObserver method.

Removes an Observer.

Usage example:

This method is protected, in a sense that it's not meant to be called directly. o2.AjaxController and o2.JsonpController use it indirectly to unregister themselves.

static deleteObservers()

An implementation of the Observer.deleteObservers method.

Unregisteres all of the registered Observers.

Usage example:

 o2.AjaxController.deleteObservers();
 
static init()

Initializes the object and starts notifying registered observers.

Usage example:

 o2.AjaxState.init();
 

Sends a timeout request and unregisters all registered Observers.

Usage example:

 o2.AjaxState.timeoutAllObservers();
 
protected static timeoutObservers (Array observers)

Sends a timeout request and unregisters the given Observers.

This method is protected, in a sense that it's not meant to be called directly. o2.AjaxController and o2.JsonpController use it indirectly to timeout themselves.

Property Details

property protected readonly Array observers

A collection of the registered Observers.


Function Details

function addObserver

protected static addObserver(Object observer)

An implementation of the Observer.addObserver method.

Registers an Observer.

This method is protected, in a sense that it's not meant to be called directly. o2.AjaxController and o2.JsonpController use it indirectly to register themselves.

Parameters:
observer - the Observer to register.

function countObservers

static countObservers()

An implementation of the Observer.countObservers method.

Gets the Observer count.

Usage example:

 var count = o2.AjaxState.countObservers();
 
Returns:
the number of registered Observers.

function deleteObserver

protected static deleteObserver(Object observer)

An implementation of the Observer.deleteObserver method.

Removes an Observer.

Usage example:

This method is protected, in a sense that it's not meant to be called directly. o2.AjaxController and o2.JsonpController use it indirectly to unregister themselves.

Parameters:
observer - the Observer to remove.

function deleteObservers

static deleteObservers()

An implementation of the Observer.deleteObservers method.

Unregisteres all of the registered Observers.

Usage example:

 o2.AjaxController.deleteObservers();
 

function init

static init()

Initializes the object and starts notifying registered observers.

Usage example:

 o2.AjaxState.init();
 

function timeoutAllObservers

static timeoutAllObservers()

Sends a timeout request and unregisters all registered Observers.

Usage example:

 o2.AjaxState.timeoutAllObservers();
 

function timeoutObservers

protected static timeoutObservers(Array observers)

Sends a timeout request and unregisters the given Observers.

This method is protected, in a sense that it's not meant to be called directly. o2.AjaxController and o2.JsonpController use it indirectly to timeout themselves.

Parameters:
observers - A collection of AjaxController objects.