Class ETClient

  • All Implemented Interfaces:
    ToolClient

    public class ETClient
    extends AbstractToolClient
    Client to start and stop ecu.test by either COM or XML-RPC communication.
    • Constructor Detail

      • ETClient

        public ETClient​(String toolName,
                        String installPath,
                        String workspaceDir,
                        String settingsDir,
                        int timeout,
                        boolean debugMode)
        Instantiates a new ETClient.
        Parameters:
        toolName - the tool name identifying the chosen ETInstallation.
        installPath - the ecu.test install path
        workspaceDir - the ecu.test workspace directory
        settingsDir - the ecu.test settings directory
        timeout - the timeout to start ecu.test
        debugMode - specifies whether to enable debug mode
      • ETClient

        public ETClient​(String toolName,
                        int timeout)
        Instantiates a new ETClient.
        Parameters:
        toolName - the tool name identifying the chosen ETInstallation.
        timeout - the timeout to start ecu.test
    • Method Detail

      • checkProcesses

        public static List<String> checkProcesses​(Launcher launcher,
                                                  TaskListener listener,
                                                  boolean kill)
                                           throws IOException,
                                                  InterruptedException
        Checks already opened ecu.test instances.
        Parameters:
        launcher - the launcher
        listener - the listener
        kill - specifies whether to task-kill the running processes
        Returns:
        list of found processes, can be empty but never null
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the current thread is interrupted while waiting for the completion
      • stopProcesses

        public static boolean stopProcesses​(Launcher launcher,
                                            TaskListener listener,
                                            boolean kill)
                                     throws IOException,
                                            InterruptedException
        Closes already opened ecu.test instances.
        Parameters:
        launcher - the launcher
        listener - the listener
        kill - specifies whether to task-kill the running processes
        Returns:
        true if ecu.test instance has been stopped successfully
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the current thread is interrupted while waiting for the completion
      • getWorkspaceDir

        public String getWorkspaceDir()
      • getSettingsDir

        public String getSettingsDir()
      • isDebugMode

        public boolean isDebugMode()
      • getVersion

        public String getVersion()
      • getLastTbc

        public String getLastTbc()
      • getLastTcf

        public String getLastTcf()
      • isLicenseCheck

        public boolean isLicenseCheck()
      • setLicenseCheck

        public void setLicenseCheck​(boolean licenseCheck)
      • start

        public boolean start​(boolean checkProcesses,
                             FilePath workspace,
                             Launcher launcher,
                             TaskListener listener)
                      throws IOException,
                             InterruptedException
        Description copied from interface: ToolClient
        Starts a tool.
        Parameters:
        checkProcesses - specifies whether to check open processes after tear down
        workspace - the workspace
        launcher - the launcher
        listener - the listener
        Returns:
        true if successful, false otherwise
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the build gets interrupted
      • stop

        public boolean stop​(boolean checkProcesses,
                            FilePath workspace,
                            Launcher launcher,
                            TaskListener listener)
                     throws InterruptedException,
                            IOException
        Description copied from interface: ToolClient
        Stops a tool.
        Parameters:
        checkProcesses - specifies whether to check open processes after tear down
        workspace - the workspace
        launcher - the launcher
        listener - the listener
        Returns:
        true if successful, false otherwise
        Throws:
        InterruptedException - if the build gets interrupted
        IOException - signals that an I/O exception has occurred
      • restart

        public boolean restart​(boolean checkProcesses,
                               FilePath workspace,
                               Launcher launcher,
                               TaskListener listener)
                        throws IOException,
                               InterruptedException
        Description copied from interface: ToolClient
        Restarts a tool.
        Parameters:
        checkProcesses - specifies whether to check open processes after tear down
        workspace - the workspace
        launcher - the launcher
        listener - the listener
        Returns:
        true if successful, false otherwise
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the build gets interrupted
      • checkProcessArchitecture

        public boolean checkProcessArchitecture​(String processPath,
                                                boolean is64BitJVM,
                                                Launcher launcher)
                                         throws IOException,
                                                InterruptedException
        Checks the process architecture compatibility between ecu.test and underlying JVM that runs the agent. A 64-bit JVM supports both 32-bit and 64-bit ecu.test, while 32-bit JVM is only compatible with 32-bit ecu.test.
        Parameters:
        processPath - the full process path
        is64BitJVM - specifies whether the JVM supports 64-bit architecture
        launcher - the launcher
        Returns:
        true if architectures are compatible, false otherwise
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the current thread is interrupted while waiting for the completion
      • updateUserLibs

        public boolean updateUserLibs​(Launcher launcher,
                                      TaskListener listener)
                               throws IOException,
                                      InterruptedException
        Updates all user libraries.
        Parameters:
        launcher - the launcher
        listener - the listener
        Returns:
        true if update is successful, false otherwise
        Throws:
        IOException - signals that an I/O exception has occurred
        InterruptedException - if the current thread is interrupted while waiting for the completion
      • checkConfigStatus

        public boolean checkConfigStatus​(Launcher launcher,
                                         TaskListener listener)
                                  throws IOException,
                                         InterruptedException
        Checks whether the currently selected configurations are started.
        Parameters:
        launcher - the launcher
        listener - the listener
        Returns:
        true if configurations are started, false otherwise
        Throws:
        IOException - the io exception
        InterruptedException - the interrupted exception