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
-
-
Constructor Summary
Constructors Constructor Description AbstractToolClient(String toolName, int timeout)
Instantiates a newAbstractToolClient
.AbstractToolClient(String toolName, String installPath, int timeout)
Instantiates a newAbstractToolClient
.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ArgumentListBuilder
createCmdLine()
Creates the command line string for a process invocation.String
getInstallPath()
int
getTimeout()
String
getToolName()
protected boolean
launchProcess(Launcher launcher, TaskListener listener)
Launches a process by usingArgumentListBuilder
and waits for start up within a given timeout.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.tracetronic.jenkins.plugins.ecutest.tool.client.ToolClient
restart, start, stop
-
-
-
-
Constructor Detail
-
AbstractToolClient
public AbstractToolClient(String toolName, String installPath, int timeout)
Instantiates a newAbstractToolClient
.- Parameters:
toolName
- the tool name identifying the chosenETInstallation
.installPath
- the install pathtimeout
- the timeout
-
AbstractToolClient
public AbstractToolClient(String toolName, int timeout)
Instantiates a newAbstractToolClient
.- Parameters:
toolName
- the tool name identifying the chosenETInstallation
.timeout
- the timeout
-
-
Method Detail
-
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 usingArgumentListBuilder
and waits for start up within a given timeout.- Parameters:
launcher
- the launcherlistener
- the listener- Returns:
true
if process invocation succeeded,false
if launching process failed or timeout exceeded- Throws:
InterruptedException
- if the build gets interrupted
-
-