Class AbstractToolClient

java.lang.Object
de.tracetronic.jenkins.plugins.ecutest.tool.client.AbstractToolClient
All Implemented Interfaces:
ToolClient
Direct Known Subclasses:
ETClient, ETComRegisterClient, TSClient

public abstract class AbstractToolClient extends Object implements ToolClient
Common base class for ETClient and TSClient.
  • Constructor Details

    • AbstractToolClient

      public AbstractToolClient(String toolName, String installPath, int timeout)
      Instantiates a new AbstractToolClient.
      Parameters:
      toolName - the tool name identifying the chosen ETInstallation.
      installPath - the install path
      timeout - the timeout
    • AbstractToolClient

      public AbstractToolClient(String toolName, int timeout)
      Instantiates a new AbstractToolClient.
      Parameters:
      toolName - the tool name identifying the chosen ETInstallation.
      timeout - the timeout
  • Method Details

    • getToolName

      public String getToolName()
    • getInstallPath

      public String getInstallPath()
    • getTimeout

      public int getTimeout()
    • createCmdLine

      protected abstract ArgumentListBuilder createCmdLine()
      Creates the command line string for a process invocation.
      Returns:
      the ArgumentListBuilder
    • launchProcess

      protected boolean launchProcess(Launcher launcher, TaskListener listener) throws InterruptedException
      Launches a process by using ArgumentListBuilder and waits for start up within a given timeout.
      Parameters:
      launcher - the launcher
      listener - the listener
      Returns:
      true if process invocation succeeded, false if launching process failed or timeout exceeded
      Throws:
      InterruptedException - if the build gets interrupted