(AIR only)
Pacoteair.net
Classepublic class SocketMonitor
HerançaSocketMonitor Inheritance ServiceMonitor Inheritance EventDispatcher Inheritance Object

Monitors availablity of a TCP endpoint.

This class is included in the ServiceMonitor.swc file.



Propriedades Públicas
 PropriedadeDefinido por
 Inheritedavailable : 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
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  host : String
[read-only] The host being monitored.
SocketMonitor
 InheritedlastStatusUpdate : Date
[read-only] The time of the last status update.
ServiceMonitor
 InheritedpollInterval : Number
The interval, in milliseconds, for polling the server.
ServiceMonitor
  port : int
[read-only] The port being monitored.
SocketMonitor
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
 Inheritedrunning : Boolean
[read-only] Whether the monitor has been started.
ServiceMonitor
Métodos Públicos
 MétodoDefinido por
  
SocketMonitor(host:String, port:int)
Creates a SocketMonitor Object for a specified TCP endpoint.
SocketMonitor
 Inherited
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
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
makeJavascriptSubclass(constructorFunction:Object):void
[static] Adds public ServiceMonitor methods to a JavaScript constructor function's prototype.
ServiceMonitor
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Start the service monitor.
ServiceMonitor
 Inherited
Stop monitoring the service.
ServiceMonitor
  
SocketMonitor
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Métodos Protegidos
 MétodoDefinido por
  
SocketMonitor
Eventos
 Evento Descrição Definido por
 Inherited Dispatched when Flash Player or the and AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited Dispatched when Flash Player loses operating system focus and is becoming inactive.EventDispatcher
 Inherited Indicates that the service status has changed.ServiceMonitor
Detalhes da propriedade
hostpropriedade
host:String  [read-only]

The host being monitored.


Implementação
    public function get host():String
portpropriedade 
port:int  [read-only]

The port being monitored.


Implementação
    public function get port():int
Detalhes do construtor
SocketMonitor()Construtor
public function SocketMonitor(host:String, port:int)

Creates a SocketMonitor Object for a specified TCP endpoint.

After creating a SocketMonitor, 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 SocketMonitor object. Otherwise, the runtime deletes the object and monitoring ends.

Parâmetros
host:String — The host to monitor.
 
port:int — The port to monitor.
Detalhes do método
checkStatus()método
protected override function checkStatus():void
toString()método 
public override function toString():String

Retorna
String