Jetif v1.8.0

jetif
Class SuiteController

java.lang.Object
  extended byjetif.SuiteController

public final class SuiteController
extends Object

This class SuiteController represents a controller to control a suite. This class is used only by a custom UI for the framework. A custom UI should provides a suite spec to construct the suite controller, and then call start() method of this class to run the suite.

Author:
Vicky Wang

Constructor Summary
SuiteController(SuiteSpec spec)
          Construct from a suite spec.
 
Method Summary
 void interrupt()
          Interrupt current running suite.
 boolean isRunning()
          Test if this suite is running.
 TestListener setListener(TestListener listener)
          Assign a test listener to this suite controller.
 boolean start()
          Start the suite controlled by this controller.
 boolean waitCompleted(long timeout)
          Wait this running suite completed or the specified milliseconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SuiteController

public SuiteController(SuiteSpec spec)
                throws FrameworkException
Construct from a suite spec.

Parameters:
spec - the suite spec for this suite.
Throws:
FrameworkException - if any error occurs.
Method Detail

setListener

public TestListener setListener(TestListener listener)
Assign a test listener to this suite controller.
The suite controller will pass the suite running information to the test listener.

Parameters:
listener - The new test listener
Returns:
the old listener assigned to this suite controller.

start

public boolean start()
Start the suite controlled by this controller.

Returns:
true means the suite was started successfully.

interrupt

public void interrupt()
Interrupt current running suite. Call the interrupt() of the suite thread. This method may do nothing if you catch the InterruptedException in your code and do nothing in the catch statement.


waitCompleted

public boolean waitCompleted(long timeout)
Wait this running suite completed or the specified milliseconds.

Parameters:
timeout - the maximum time to wait in milliseconds. zero or negative value means wait till the suite completed.
Returns:
true if the suite is completed.

isRunning

public boolean isRunning()
Test if this suite is running.

Returns:
true if the suite is running

Jetif v1.8.0

Copyright © 2004,2005 Vicky Wang - All Rights Reserved.