window.runtime property | window.runtime.air.net.URLMonitor |
Inheritance | URLMonitor ServiceMonitor EventDispatcher Object |
Runtime Versions: | 1.0 |
To use this class in JavaScript code, load the aircore.swf file, as in the following:
<script src="aircore.swf" type="application/x-shockwave-flash">
See also
Property | Defined By | ||
---|---|---|---|
acceptableStatusCodes : Array
The numeric status codes representing a successful result. | URLMonitor | ||
available : Boolean
Whether the service is currently considered "available."
The initial value is false until either a status check sets the
property to true or the property is initialized to true explicitly.
Typically, this property is set by the checkStatus() implementation in a subclass or specializer,
but if the application has independent information about a service's availability (for example, a request just succeeded
or failed), the property can be set explicitly.
| ServiceMonitor | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
lastStatusUpdate : Date [read-only]
The time of the last status update. | ServiceMonitor | ||
pollInterval : Number
The interval, in milliseconds, for polling the server. | ServiceMonitor | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
running : Boolean [read-only]
Whether the monitor has been started. | ServiceMonitor | ||
urlRequest : URLRequest [read-only]
The URLRequest object representing the probe request. | URLMonitor |
Method | Defined By | ||
---|---|---|---|
URLMonitor(urlRequest:URLRequest, acceptableStatusCodes:Array = null)
Creates a URLMonitor Object for a specified HTTP- or HTTPS-based service. | URLMonitor | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow. | EventDispatcher | ||
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
hasOwnProperty(name:String):Boolean
Indicates whether an object has a specified property defined. | Object | ||
isPrototypeOf(theClass:Object):Boolean
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
makeJavascriptSubclass(constructorFunction:Object):void [static]
Adds public ServiceMonitor methods to a JavaScript constructor function's prototype. | ServiceMonitor | ||
propertyIsEnumerable(name:String):Boolean
Indicates whether the specified property exists and is enumerable. | Object | ||
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void
Sets the availability of a dynamic property for loop operations. | Object | ||
start():void
Starts the service monitor. | ServiceMonitor | ||
stop():void
Stops monitoring the service. | ServiceMonitor | ||
toLocaleString():String
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
toString():String [override]
Returns the string representation of the specified object. | URLMonitor | ||
valueOf():Object
Returns the primitive value of the specified object. | Object | ||
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Method | Defined By | ||
---|---|---|---|
checkStatus():void [override]
Attempts to load content from a URL in the background, to check for a
returned HTTP status code. | URLMonitor |
acceptableStatusCodes | property |
acceptableStatusCodes:Array
Runtime Versions: | 1.0 |
The numeric status codes representing a successful result.
urlRequest | property |
urlRequest:URLRequest
[read-only] Runtime Versions: | 1.0 |
The URLRequest object representing the probe request.
URLMonitor | () | Constructor |
public function URLMonitor(urlRequest:URLRequest, acceptableStatusCodes:Array = null)
Runtime Versions: | 1.0 |
Creates a URLMonitor Object for a specified HTTP- or HTTPS-based service.
After creating a URLMonitor, the caller should call the start()
method to begin monitoring the status of the service.
As with the Timer object, the caller should maintain a reference to the URLMonitor object. Otherwise the runtime could delete the object, thereby ending the monitoring.
A URLRequest parameter specifies the probe request for polling the server.
Typically, the request method will be either "GET"
or "HEAD"
.
urlRequest:URLRequest — The URLRequest object representing a probe request for polling the server.
| |
acceptableStatusCodes:Array (default = null ) — An array of numeric status codes listing the codes that represent a successful result.
If you do not specify a value for the
|
checkStatus | () | method |
protected function checkStatus():void
Runtime Versions: | 1.0 |
Attempts to load content from a URL in the background, to check for a returned HTTP status code.
If it receives a status code that is listed in the acceptableStatusCodes
property, the available
property will be set to true
.
If it receives a status code that is not in the acceptableStatusCodes
list, or if there is a security error or I/O error, the available
property will be set to false
.
toString | () | method |
public function toString():String
Runtime Versions: | 1.0 |
Returns the string representation of the specified object.
ReturnsString — A string representation of the object.
|
Thu Sep 29 2011, 02:34 AM -07:00