org.alfresco.bm.server
Class BMTestRun

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

public class BMTestRun
extends Object
implements org.alfresco.config.ConfigDataListener, org.alfresco.config.ConfigClassesListener, org.alfresco.config.ConfigChildListener, ConfigConstants

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.server.ConfigConstants
ConfigConstants.RunState
 
Field Summary
 
Fields inherited from interface org.alfresco.bm.server.ConfigConstants
DEFAULT_RUNSTATE, DEFAULT_SERVER_ID, EXT_JAR, EXT_PROPERTIES, EXT_XML, PATH_CLASSES, PATH_CLUSTER_PROPERTIES, PATH_CLUSTERS, PATH_CONFIG, PATH_JARS, PATH_LOADED, PATH_RUN_PROPERTIES, PATH_RUNS, PATH_SERVER, PATH_SERVERS, PATH_TEST_CONTEXT, PATH_TEST_PROPERTIES, PATH_TESTS, PROP_CLUSTER, PROP_CONTROL_RUN_STATE, PROP_EVENT_PROCESSOR_THREADS, PROP_HTTP_CONNECTION_MAX, PROP_HTTP_CONNECTION_TIMEOUT_MS, PROP_HTTP_SOCKET_TIMEOUT_MS, 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)
           
 void classesChanged(String path)
           
 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)
Specified by:
classesChanged in interface org.alfresco.config.ConfigClassesListener

dataChanged

public void dataChanged(String path,
                        boolean deleted)
Specified by:
dataChanged in interface org.alfresco.config.ConfigDataListener

childrenChanged

public void childrenChanged(String path)
Specified by:
childrenChanged in interface org.alfresco.config.ConfigChildListener


Copyright © 2012. All Rights Reserved.