Class ETClient
java.lang.Object
de.tracetronic.jenkins.plugins.ecutest.tool.client.AbstractToolClient
de.tracetronic.jenkins.plugins.ecutest.tool.client.ETClient
- All Implemented Interfaces:
ToolClient
Client to start and stop ecu.test by either COM or XML-RPC communication.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckConfigStatus(Launcher launcher, TaskListener listener) Checks whether the currently selected configurations are started.booleancheckLicense(Launcher launcher, TaskListener listener) Check license of ecu.test.booleancheckProcessArchitecture(String processPath, boolean is64BitJVM, Launcher launcher) Checks the process architecture compatibility between ecu.test and underlying JVM that runs the agent.checkProcesses(Launcher launcher, TaskListener listener, boolean kill) Checks already opened ecu.test instances.protected ArgumentListBuilderCreates the command line string for a process invocation.static ToolVersiongetComVersion(Launcher launcher, TaskListener listener) Gets the COM version of currently running ecu.test instance.booleanbooleanbooleanrestart(boolean checkProcesses, FilePath workspace, Launcher launcher, TaskListener listener) Restarts a tool.voidsetLicenseCheck(boolean licenseCheck) booleanstart(boolean checkProcesses, FilePath workspace, Launcher launcher, TaskListener listener) Starts a tool.booleanstop(boolean checkProcesses, FilePath workspace, Launcher launcher, TaskListener listener) Stops a tool.static booleanstopProcesses(Launcher launcher, TaskListener listener, boolean kill) Closes already opened ecu.test instances.booleanupdateUserLibs(Launcher launcher, TaskListener listener) Updates all user libraries.Methods inherited from class de.tracetronic.jenkins.plugins.ecutest.tool.client.AbstractToolClient
getInstallPath, getTimeout, getToolName, launchProcess
-
Constructor Details
-
ETClient
public ETClient(String toolName, String installPath, String workspaceDir, String settingsDir, int timeout, boolean debugMode) Instantiates a newETClient.- Parameters:
toolName- the tool name identifying the chosenETInstallation.installPath- the ecu.test install pathworkspaceDir- the ecu.test workspace directorysettingsDir- the ecu.test settings directorytimeout- the timeout to start ecu.testdebugMode- specifies whether to enable debug mode
-
ETClient
Instantiates a newETClient.- Parameters:
toolName- the tool name identifying the chosenETInstallation.timeout- the timeout to start ecu.test
-
-
Method Details
-
checkProcesses
public static List<String> checkProcesses(Launcher launcher, TaskListener listener, boolean kill) throws IOException, InterruptedException Checks already opened ecu.test instances.- Parameters:
launcher- the launcherlistener- the listenerkill- 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 occurredInterruptedException- 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 launcherlistener- the listenerkill- specifies whether to task-kill the running processes- Returns:
trueif ecu.test instance has been stopped successfully- Throws:
IOException- signals that an I/O exception has occurredInterruptedException- if the current thread is interrupted while waiting for the completion
-
getComVersion
public static ToolVersion getComVersion(Launcher launcher, TaskListener listener) throws IOException, InterruptedException Gets the COM version of currently running ecu.test instance.- Parameters:
launcher- the launcherlistener- the listener- Returns:
- the COM version
- Throws:
IOException- signals that an I/O exception has occurredInterruptedException- if the current thread is interrupted while waiting for the completion
-
checkLicense
public boolean checkLicense(Launcher launcher, TaskListener listener) throws IOException, InterruptedException Check license of ecu.test.- Parameters:
launcher- the launcherlistener- the listener- Returns:
trueif ecu.test instance has been stopped successfully- Throws:
IOException- the io exceptionInterruptedException- the interrupted exception
-
getWorkspaceDir
-
getSettingsDir
-
isDebugMode
public boolean isDebugMode() -
getVersion
-
getLastTbc
-
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:ToolClientStarts a tool.- Parameters:
checkProcesses- specifies whether to check open processes after tear downworkspace- the workspacelauncher- the launcherlistener- the listener- Returns:
trueif successful,falseotherwise- Throws:
IOException- signals that an I/O exception has occurredInterruptedException- if the build gets interrupted
-
stop
public boolean stop(boolean checkProcesses, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException Description copied from interface:ToolClientStops a tool.- Parameters:
checkProcesses- specifies whether to check open processes after tear downworkspace- the workspacelauncher- the launcherlistener- the listener- Returns:
trueif successful,falseotherwise- Throws:
InterruptedException- if the build gets interruptedIOException- 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:ToolClientRestarts a tool.- Parameters:
checkProcesses- specifies whether to check open processes after tear downworkspace- the workspacelauncher- the launcherlistener- the listener- Returns:
trueif successful,falseotherwise- Throws:
IOException- signals that an I/O exception has occurredInterruptedException- if the build gets interrupted
-
createCmdLine
Description copied from class:AbstractToolClientCreates the command line string for a process invocation.- Specified by:
createCmdLinein classAbstractToolClient- Returns:
- the
ArgumentListBuilder
-
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 pathis64BitJVM- specifies whether the JVM supports 64-bit architecturelauncher- the launcher- Returns:
trueif architectures are compatible,falseotherwise- Throws:
IOException- signals that an I/O exception has occurredInterruptedException- 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 launcherlistener- the listener- Returns:
trueif update is successful,falseotherwise- Throws:
IOException- signals that an I/O exception has occurredInterruptedException- 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 launcherlistener- the listener- Returns:
trueif configurations are started,falseotherwise- Throws:
IOException- the io exceptionInterruptedException- the interrupted exception
-