Package | org.flexunit.runner.notification.async |
Class | public class AsyncListenerWatcher |
Inheritance | AsyncListenerWatcher ![]() |
AsyncListenerWatcher
is responsible for determing whether all
IAsyncStartupRunListener
s that it is watching are ready. This is used
in order to make sure that all potential IAsyncStartupRunListener
s that
are used in a test run are ready before the test run begins.
In order to track a IAsyncStartupRunListener
, the listener must be watched
by calling the #watchListener()
method. Once a listener is being watched,
it will be counted as a pending listener. Once the lister reports that it is ready or
it has failed, it will be removed as a pending listener. Once all listeners are no longer
pending, the test run can begin.
In order to unwatch a listener, the #unwatchListener()
method needs to be called,
providing the method with the IAsyncStartupRunListener
to stop watching.
Property | Defined By | ||
---|---|---|---|
allListenersComplete : Boolean [read-only]
Returns a Boolean value indicating whether all are complete
| AsyncListenerWatcher | ||
allListenersReady : Boolean [read-only]
Returns a Boolean value indicating whether all listeners are ready
| AsyncListenerWatcher | ||
completeToken : AsyncCoreStartupToken [read-only]
Returns the complete AsyncCoreStartupToken
| AsyncListenerWatcher | ||
pendingCount : int [read-only]
Returns the number of pending start ups
| AsyncListenerWatcher | ||
startUpToken : AsyncCoreStartupToken [read-only]
Returns the start up AsyncCoreStartupToken
| AsyncListenerWatcher | ||
totalCount : int [read-only]
Returns the number of total start ups
| AsyncListenerWatcher |
Method | Defined By | ||
---|---|---|---|
AsyncListenerWatcher(notifier:IRunNotifier, logger:*)
Constructor. | AsyncListenerWatcher | ||
unwatchListener(listener:IAsyncStartupRunListener):void
Makes the AsyncListenerWatcher stop watching the provided IAsyncStartupRunListener
| AsyncListenerWatcher | ||
watchListener(listener:IAsyncStartupRunListener):void
Makes the AsyncListenerWatcher start watching the provided IAsyncStartupRunListener
| AsyncListenerWatcher |
Method | Defined By | ||
---|---|---|---|
cleanupStartupListeners(listener:IAsyncStartupRunListener):void
Stop monitoring the IAsyncStartupRunListener
| AsyncListenerWatcher | ||
handleListenerFailed(event:Event):void
Stops listening when the listener will be ready, removes the listener from the IRunNotifier. | AsyncListenerWatcher | ||
handleListenerReady(event:Event):void
Stops listening when the listener will be ready and determines if all other listeners are ready
| AsyncListenerWatcher | ||
monitorForAsyncStartup(listener:IAsyncStartupRunListener):void
Monitors the IAsyncStartupRunListener to determine if the listener is ready or if
the listener has failed
| AsyncListenerWatcher | ||
sendReadyNotification():void
Instruct the start up token that all listeners are now ready
| AsyncListenerWatcher |
Constant | Defined By | ||
---|---|---|---|
LISTENER_COMPLETE : String = listenerComplete [static] | AsyncListenerWatcher | ||
LISTENER_FAILED : String = listenerFailed [static] | AsyncListenerWatcher | ||
LISTENER_READY : String = listenerReady [static] | AsyncListenerWatcher |
allListenersComplete | property |
allListenersComplete:Boolean
[read-only] Returns a Boolean value indicating whether all are complete
public function get allListenersComplete():Boolean
allListenersReady | property |
allListenersReady:Boolean
[read-only] Returns a Boolean value indicating whether all listeners are ready
public function get allListenersReady():Boolean
completeToken | property |
completeToken:AsyncCoreStartupToken
[read-only]
Returns the complete AsyncCoreStartupToken
public function get completeToken():AsyncCoreStartupToken
pendingCount | property |
pendingCount:int
[read-only] Returns the number of pending start ups
public function get pendingCount():int
startUpToken | property |
startUpToken:AsyncCoreStartupToken
[read-only]
Returns the start up AsyncCoreStartupToken
public function get startUpToken():AsyncCoreStartupToken
totalCount | property |
totalCount:int
[read-only] Returns the number of total start ups
public function get totalCount():int
AsyncListenerWatcher | () | Constructor |
public function AsyncListenerWatcher(notifier:IRunNotifier, logger:*)
Constructor.
Parametersnotifier:IRunNotifier | |
logger:* |
cleanupStartupListeners | () | method |
protected function cleanupStartupListeners(listener:IAsyncStartupRunListener):void
Stop monitoring the IAsyncStartupRunListener
Parameters
listener:IAsyncStartupRunListener — The IAsyncStartupRunListener to stop listening to
|
handleListenerFailed | () | method |
protected function handleListenerFailed(event:Event):void
Stops listening when the listener will be ready, removes the listener from the IRunNotifier
.
and determines if all other listeners are ready
Parameters
event:Event |
handleListenerReady | () | method |
protected function handleListenerReady(event:Event):void
Stops listening when the listener will be ready and determines if all other listeners are ready
Parameters
event:Event |
monitorForAsyncStartup | () | method |
protected function monitorForAsyncStartup(listener:IAsyncStartupRunListener):void
Monitors the IAsyncStartupRunListener
to determine if the listener is ready or if
the listener has failed
Parameters
listener:IAsyncStartupRunListener — The IAsyncStartupRunListener to listen to
|
sendReadyNotification | () | method |
protected function sendReadyNotification():void
Instruct the start up token that all listeners are now ready
unwatchListener | () | method |
public function unwatchListener(listener:IAsyncStartupRunListener):void
Makes the AsyncListenerWatcher stop watching the provided IAsyncStartupRunListener
Parameters
listener:IAsyncStartupRunListener — The IAsyncStartupRunListener to stop watching
|
watchListener | () | method |
public function watchListener(listener:IAsyncStartupRunListener):void
Makes the AsyncListenerWatcher start watching the provided IAsyncStartupRunListener
Parameters
listener:IAsyncStartupRunListener — The IAsyncStartupRunListener to watch
|
LISTENER_COMPLETE | Constant |
public static const LISTENER_COMPLETE:String = listenerComplete
LISTENER_FAILED | Constant |
public static const LISTENER_FAILED:String = listenerFailed
LISTENER_READY | Constant |
public static const LISTENER_READY:String = listenerReady