Class o2.AjaxState
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
static
class
o2.AjaxState
A collection of the registered Observer
s.
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.
An implementation of the Observer.countObservers
method.
Gets the Observer
count.
Usage example:
var count = o2.AjaxState.countObservers();
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.
An implementation of the Observer.deleteObservers
method.
Unregisteres all of the registered Observer
s.
Usage example:
o2.AjaxController.deleteObservers();
Initializes the object and starts notifying registered observers.
Usage example:
o2.AjaxState.init();
Sends a timeout request and unregisters all registered
Observer
s.
Usage example:
o2.AjaxState.timeoutAllObservers();
Sends a timeout request and unregisters the given
Observer
s.
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 Observer
s.
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.
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();
Observer
s.
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.
observer
- the Observer
to remove. function deleteObservers
static
deleteObservers()
An implementation of the Observer.deleteObservers
method.
Unregisteres all of the registered Observer
s.
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
Observer
s.
Usage example:
o2.AjaxState.timeoutAllObservers();
function timeoutObservers
protected static
timeoutObservers(Array
observers)
Sends a timeout request and unregisters the given
Observer
s.
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.
observers
- A collection of AjaxController
objects.