org.jboss.dtf.testframework.coordinator2
Class Coordinator

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by org.jboss.dtf.testframework.coordinator2.Coordinator
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, CoordinatorInterface, RunListener

public class Coordinator
extends java.rmi.server.UnicastRemoteObject
implements CoordinatorInterface, RunListener

See Also:
Serialized Form

Field Summary
static java.lang.String COORDINATOR_NAME_SERVICE_NAME
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
Coordinator()
           
 
Method Summary
 void addRunManager(RunManager r)
           
 RunInformation[] getCurrentRunInformation()
          Retrieve information about the current run in progress.
static LoggingService getLoggingService()
           
static int getMaximumNumberOfManagers()
           
static int getMaximumNumberOfRetries()
           
static NameServiceInterface getNameService()
           
 int getNumberOfManagersInUse()
           
static ProductRepositoryInterface getProductRepository()
           
 SchedulerInterface getScheduler()
           
static ServiceRegisterInterface getServiceRegistry()
           
static void initialiseRegistry()
           
 RunUID initiateRun(ScheduleInformation schedule, boolean waitToComplete)
           
 boolean isBusy()
          Is this coordinator busy?
 RunUID isProductInUse(java.lang.String productId)
           
 boolean isRunInProgress(RunUID runId)
          Is this run in progress?
static void main(java.lang.String[] args)
           
 void restart()
          Restart the coordinator
static void RetrieveConfiguration()
          Retrieves the configuration from the coordinator's configuration file
 void run(java.net.URL testDefsURL, java.net.URL testSelectionsURL, java.lang.String distributionList, java.lang.String softwareVersion, boolean waitToComplete)
          Start a test run.
 void runComplete(RunManager runManager)
          This method is called when the run manager has completed its task.
 void shutdown()
          Shutdown the coordinator
 boolean stopRun(boolean waitForTestToComplete, RunUID runId)
          Stops the currently active run.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COORDINATOR_NAME_SERVICE_NAME

public static final java.lang.String COORDINATOR_NAME_SERVICE_NAME
See Also:
Constant Field Values
Constructor Detail

Coordinator

public Coordinator()
            throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException
Method Detail

getNameService

public static NameServiceInterface getNameService()

getServiceRegistry

public static ServiceRegisterInterface getServiceRegistry()

getProductRepository

public static ProductRepositoryInterface getProductRepository()

getMaximumNumberOfManagers

public static int getMaximumNumberOfManagers()

getMaximumNumberOfRetries

public static int getMaximumNumberOfRetries()

getNumberOfManagersInUse

public final int getNumberOfManagersInUse()

addRunManager

public final void addRunManager(RunManager r)

isRunInProgress

public boolean isRunInProgress(RunUID runId)
                        throws java.rmi.RemoteException
Description copied from interface: CoordinatorInterface
Is this run in progress?

Specified by:
isRunInProgress in interface CoordinatorInterface
Returns:
Throws:
java.rmi.RemoteException

isProductInUse

public final RunUID isProductInUse(java.lang.String productId)

restart

public void restart()
             throws java.rmi.RemoteException
Restart the coordinator

Specified by:
restart in interface CoordinatorInterface
Throws:
java.rmi.RemoteException

shutdown

public void shutdown()
              throws java.rmi.RemoteException
Shutdown the coordinator

Specified by:
shutdown in interface CoordinatorInterface
Throws:
java.rmi.RemoteException

stopRun

public boolean stopRun(boolean waitForTestToComplete,
                       RunUID runId)
                throws CoordinatorIdleException,
                       java.rmi.RemoteException
Stops the currently active run.

Specified by:
stopRun in interface CoordinatorInterface
Parameters:
waitForTestToComplete - If this parameter is true then the run will stop once the current test has finished. If false then the run will stop immediately.
Throws:
java.rmi.RemoteException
CoordinatorIdleException - If the coordinator isn't currently running any tests then this exception will be thrown.

isBusy

public boolean isBusy()
               throws java.rmi.RemoteException
Description copied from interface: CoordinatorInterface
Is this coordinator busy?

Specified by:
isBusy in interface CoordinatorInterface
Returns:
True if the coordinator is busy
Throws:
java.rmi.RemoteException

run

public void run(java.net.URL testDefsURL,
                java.net.URL testSelectionsURL,
                java.lang.String distributionList,
                java.lang.String softwareVersion,
                boolean waitToComplete)
         throws java.rmi.RemoteException,
                CoordinatorBusyException,
                CannotStartRunException
Start a test run. The coordinator will run the tests defined in testDefsURL and selected within the testSelections file.

Specified by:
run in interface CoordinatorInterface
Parameters:
testDefsURL - A URL to the test definitions file.
testSelectionsURL - A URL to the test selections file.
distributionList - The email distribution list.
softwareVersion - The software version to log against.
Throws:
java.rmi.RemoteException
CoordinatorBusyException
CannotStartRunException

initiateRun

public RunUID initiateRun(ScheduleInformation schedule,
                          boolean waitToComplete)
                   throws java.rmi.RemoteException,
                          CoordinatorBusyException,
                          CannotStartRunException
Throws:
java.rmi.RemoteException
CoordinatorBusyException
CannotStartRunException

getScheduler

public SchedulerInterface getScheduler()
                                throws java.rmi.RemoteException
Specified by:
getScheduler in interface CoordinatorInterface
Throws:
java.rmi.RemoteException

getCurrentRunInformation

public RunInformation[] getCurrentRunInformation()
                                          throws CoordinatorIdleException,
                                                 java.rmi.RemoteException
Retrieve information about the current run in progress.

Specified by:
getCurrentRunInformation in interface CoordinatorInterface
Returns:
Throws:
java.rmi.RemoteException
CoordinatorIdleException - If the coordinator is not currently running any tests.

RetrieveConfiguration

public static void RetrieveConfiguration()
Retrieves the configuration from the coordinator's configuration file


runComplete

public void runComplete(RunManager runManager)
This method is called when the run manager has completed its task.

Specified by:
runComplete in interface RunListener
Parameters:
runManager - The run manager that has completed

getLoggingService

public static LoggingService getLoggingService()

initialiseRegistry

public static void initialiseRegistry()

main

public static void main(java.lang.String[] args)