| Pacote | air.net |
| Classe | public class URLMonitor |
| Herança | URLMonitor ServiceMonitor EventDispatcher Object |
This class is included in the ServiceMonitor.swc file.
| Propriedade | Definido por | ||
|---|---|---|---|
| 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 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 exemplo, 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 representing the probe request.
| URLMonitor | ||
| Método | Definido por | ||
|---|---|---|---|
|
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 | |
![]() |
Dispatches an event into the event flow.
| EventDispatcher | |
![]() |
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event.
| EventDispatcher | |
![]() |
Indicates whether an object has a specified property defined.
| Object | |
![]() |
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter.
| Object | |
![]() |
[static]
Adds public ServiceMonitor methods to a JavaScript constructor function's prototype.
| ServiceMonitor | |
![]() |
Indicates whether the specified property exists and is enumerable.
| Object | |
![]() |
Removes a listener from the EventDispatcher object.
| EventDispatcher | |
![]() |
Sets the availability of a dynamic property for loop operations.
| Object | |
![]() |
Start the service monitor.
| ServiceMonitor | |
![]() |
Stop monitoring the service.
| ServiceMonitor | |
| URLMonitor | |||
![]() |
Returns the primitive value of the specified object.
| Object | |
![]() |
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type.
| EventDispatcher | |
| Método | Definido por | ||
|---|---|---|---|
| URLMonitor | |||
| acceptableStatusCodes | propriedade |
acceptableStatusCodes:Array [read-write] The numeric status codes representing a successful result.
public function get acceptableStatusCodes():Array
public function set acceptableStatusCodes(value:Array):void
| urlRequest | propriedade |
urlRequest:URLRequest [read-only] The urlRequest representing the probe request.
public function get urlRequest():URLRequest
| URLMonitor | () | Construtor |
public function URLMonitor(urlRequest:URLRequest, acceptableStatusCodes:Array = null)
Creates a URLMonitor Object for a specified HTTP or HTTPS-based service.
After creating a URLMonitor, the caller should call start
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 deletes the object and monitoring ends.
A URLRequest parameter specifies the probe request for polling the server.
Typically, the request method will be either "GET" or "HEAD".
The default successful response codes are as follows:
urlRequest:URLRequest — The URLRequest representing a probe request for polling the server.
|
|
acceptableStatusCodes:Array (default = null) — An array of numeric status codes representing a successful result.
|
| checkStatus | () | método |
protected override function checkStatus():void
| toString | () | método |