| window.runtime property | window.runtime.air.net.SocketMonitor |
| Inheritance | SocketMonitor ServiceMonitor EventDispatcher Object |
To use this class in JavaScript code, load the ServiceMonitor.swf file, as in the following:
<script src="ServiceMonitor.swf" type="application/x-shockwave-flash">
| Property | Defined By | ||
|---|---|---|---|
![]() | 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 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 | |
| host : String
[read-only]
The host being monitored.
| SocketMonitor | ||
![]() | lastStatusUpdate : Date
[read-only]
The time of the last status update.
| ServiceMonitor | |
![]() | pollInterval : Number
The interval, in milliseconds, for polling the server.
| ServiceMonitor | |
| port : int
[read-only]
The port being monitored.
| SocketMonitor | ||
![]() | 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 | |
| Method | Defined By | ||
|---|---|---|---|
|
SocketMonitor(host:String, port:int)
Creates a SocketMonitor Object for a specified TCP endpoint.
| SocketMonitor | ||
![]() |
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
Start the service monitor.
| ServiceMonitor | |
![]() |
stop():void
Stop monitoring the service.
| ServiceMonitor | |
|
toString():String
Returns the string representation of the specified object.
| SocketMonitor | ||
![]() |
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
Calling the checkStatus() method of a SocketMonitor object causes
the application to try connecting to the socket, to check for a
connect event.
| SocketMonitor | ||
| host | property |
host:String [read-only] The host being monitored.
| port | property |
port:int [read-only] The port being monitored.
| SocketMonitor | () | Constructor |
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.
Parametershost:String — The host to monitor.
|
|
port:int — The port to monitor.
|
| checkStatus | () | method |
function checkStatus():void
Calling the checkStatus() method of a SocketMonitor object causes
the application to try connecting to the socket, to check for a
connect event.
| toString | () | method |
function toString():String
Returns the string representation of the specified object. Returns
String — A string representation of the object.
|
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/labs/air/1/jslr/air/net/SocketMonitor.html