org.alfresco.bm.server
Class BMTestRun

java.lang.Object
  extended by org.alfresco.bm.server.BMTestRun
All Implemented Interfaces:
ConfigChildListener, ConfigClassesListener, org.alfresco.bm.config.ConfigConstants, ConfigDataListener

public class BMTestRun
extends Object
implements ConfigDataListener, ConfigClassesListener, ConfigChildListener

Encapsulation of data and behaviour associated with a specific test run.

TODO: Need to log errors to distributed sink

Since:
1.0
Author:
Derek Hulley

Nested Class Summary
static class BMTestRun.Key
          The key that represents the unique data defining a specific test run i.e.
 
Nested classes/interfaces inherited from interface org.alfresco.bm.config.ConfigConstants
org.alfresco.bm.config.ConfigConstants.RunState
 
Field Summary
 
Fields inherited from interface org.alfresco.bm.config.ConfigConstants
DEFAULT_RUNSTATE, DEFAULT_SERVER_ID, PATH_CLASSES, PATH_CLUSTERS, PATH_DEFINITION, PATH_JARS, PATH_LOADED, PATH_PROPERTIES, PATH_RUNS, PATH_SERVER, PATH_SERVERS, PATH_TESTS, PROP_CLUSTER, PROP_CONTROL_CLUSTER, PROP_CONTROL_RUN_STATE, PROP_EVENT_PROCESSOR_THREADS, PROP_MONGO_URI, PROP_SERVER_ID, PROP_TEST_NAME, PROP_TEST_RUN_FQN, PROP_TEST_RUN_NAME, SEPARATOR
 
Constructor Summary
BMTestRun(BMServer server, BMTestRun.Key testRunKey)
          Consructor containing enough data for the object to go off and start itself

Initially, values are retrieved without data watches

 
Method Summary
 void checkForRestart()
          Forces a check for restart requests.
 void childrenChanged(String path)
          The children below the path have changed
 void classesChanged(String path)
          The classes rooted at the path have changed
 void dataChanged(String path, boolean deleted)
           
 boolean equals(Object obj)
          Equality is based on the test and run names.
 BMTestRun.Key getKey()
           
 void start()
          Explicit call to start the test run application.
 void stop()
          Explicit call to stop the test run application
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BMTestRun

public BMTestRun(BMServer server,
                 BMTestRun.Key testRunKey)
Consructor containing enough data for the object to go off and start itself

Initially, values are retrieved without data watches

Parameters:
server - the server constructing the test run
testRunKey - the unique test run key
configService - the configuration loader
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Equality is based on the test and run names. This must be unique within the server.

Overrides:
equals in class Object

getKey

public BMTestRun.Key getKey()
Returns:
Returns the unique key for the test run

checkForRestart

public void checkForRestart()
Forces a check for restart requests.


start

public void start()
Explicit call to start the test run application. No exceptions are thrown.


stop

public void stop()
Explicit call to stop the test run application


classesChanged

public void classesChanged(String path)
Description copied from interface: ConfigClassesListener
The classes rooted at the path have changed

Specified by:
classesChanged in interface ConfigClassesListener
Parameters:
path - full data path e.g. /alfresco/bm/clusters/default/classes

dataChanged

public void dataChanged(String path,
                        boolean deleted)
Specified by:
dataChanged in interface ConfigDataListener
Parameters:
path - full data path e.g. /alfresco/bm/clusters/default/properties
deleted - the data has been deleted

childrenChanged

public void childrenChanged(String path)
Description copied from interface: ConfigChildListener
The children below the path have changed

Specified by:
childrenChanged in interface ConfigChildListener
Parameters:
path - full data path e.g. /alfresco/bm/tests


Copyright © 2012. All Rights Reserved.