Class ExecutionContext


  • public abstract class ExecutionContext
    extends java.lang.Object
    This class helps gathering configuration parameters to ease portability between several assemblies of CLIF. It also configures log libraries and system properties.
    Author:
    Bruno Dillenseger, Florian Francheteau
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean codeServerIsShared()  
      static boolean deploymentIsBestEffort()  
      static java.lang.String getBaseDir()
      Gets the base directory of CLIF runtime environment.
      static long getDeploymentTimeOut()  
      static java.lang.String getMaxQPropFile()
      Gets location of maxq.properties file in current project
      static void init​(java.lang.String path)
      Sets the base directory of CLIF runtime environment, and configures log libraries.
      static void setMaxQPropFile​(java.lang.String dir)
      Sets absolute location of maxq.properties file in current project
      static void setProperties​(java.io.InputStream ins)
      Sets system properties according to the contents of an input stream.
      static boolean useGlobalTime()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEPLOY_RETRIES_PROP_NAME

        public static final java.lang.String DEPLOY_RETRIES_PROP_NAME
        See Also:
        Constant Field Values
      • DEPLOY_RETRIES_PROP_DEFAULT

        public static final java.lang.String DEPLOY_RETRIES_PROP_DEFAULT
        See Also:
        Constant Field Values
      • DEPLOY_RETRYDELAY_PROP_NAME

        public static final java.lang.String DEPLOY_RETRYDELAY_PROP_NAME
        See Also:
        Constant Field Values
      • DEPLOY_RETRYDELAY_PROP_DEFAULT

        public static final java.lang.String DEPLOY_RETRYDELAY_PROP_DEFAULT
        See Also:
        Constant Field Values
      • DEFAULT_SERVER

        public static final java.lang.String DEFAULT_SERVER
        Name of the default CLIF server possibly launched by a user interface for convenience
        See Also:
        Constant Field Values
      • DEFAULT_MAXQ_PROPERTY_FILE

        public static final java.lang.String DEFAULT_MAXQ_PROPERTY_FILE
        relative path to the file holding MaxQ properties in console plugin
        See Also:
        Constant Field Values
      • PROPS_PATH

        public static final java.lang.String PROPS_PATH
        relative path to the file holding CLIF system properties
        See Also:
        Constant Field Values
      • OPTS_PATH

        public static final java.lang.String OPTS_PATH
        relative path to the file holding CLIF options
        See Also:
        Constant Field Values
      • PREFETCH_FILE

        public static final java.lang.String PREFETCH_FILE
        relative path to the file holding the list of classes to prefetch (including all dependencies)
        See Also:
        Constant Field Values
      • WORKSPACE_PATH

        public static java.lang.String WORKSPACE_PATH
        absolute path to the workspace
      • PROPERTIES_WITH_PATH

        public static java.lang.String[] PROPERTIES_WITH_PATH
        Names of CLIF system properties whose value is a path
    • Constructor Detail

      • ExecutionContext

        public ExecutionContext()
    • Method Detail

      • init

        public static void init​(java.lang.String path)
        Sets the base directory of CLIF runtime environment, and configures log libraries.
        Parameters:
        path - the filesystem path to the base directory of CLIF runtime environment. Must have a trailing filesystem separator.
      • getBaseDir

        public static java.lang.String getBaseDir()
        Gets the base directory of CLIF runtime environment.
        Returns:
        the base directory of CLIF runtime environment, or null if this directory has not been set.
      • setProperties

        public static void setProperties​(java.io.InputStream ins)
        Sets system properties according to the contents of an input stream. The stream is read as a properties-formatted content, from which property clif.parameters is analyzed and transformed into system properties.
        Parameters:
        ins - input stream properties are read from
      • setMaxQPropFile

        public static void setMaxQPropFile​(java.lang.String dir)
        Sets absolute location of maxq.properties file in current project
        Parameters:
        dir - absolute location of maxq.properties
      • getMaxQPropFile

        public static java.lang.String getMaxQPropFile()
        Gets location of maxq.properties file in current project
        Returns:
        String the absolute path of maxq.properties
      • useGlobalTime

        public static boolean useGlobalTime()
        Returns:
        true if CLIF can assume that a global time is maintained by some protocol such as Network Time Protocol, false otherwise.
      • deploymentIsBestEffort

        public static boolean deploymentIsBestEffort()
        Returns:
        true if a test plan can be considered as successfully deployed event if some blades could not be deployed, false otherwise (i.e. all blades must be successfully deployed).
      • getDeploymentTimeOut

        public static long getDeploymentTimeOut()
        Returns:
        the deployment time out setting, in ms
      • codeServerIsShared

        public static boolean codeServerIsShared()
        Returns:
        true if a unique, shared code server must be used by all deployments, false otherwise (one code server per deployment).