Class ETComClient
java.lang.Object
de.tracetronic.jenkins.plugins.ecutest.wrapper.com.ETComClient
- All Implemented Interfaces:
ComApplication,AutoCloseable
COM client to initialize a COM connection and to perform requests on application specific COM API.
All threads from COM will be automatically released after closing the client or at the latest when finalizing occurred.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a newETComClientby initializing theETComDispatchwith the configured COM settings.ETComClient(int timeout) Instantiates a newETComClientby initializing theETComDispatchand waits for connection within the given timeout.ETComClient(String progId) Instantiates a newETComClientby initializing theETComDispatchwith given programmatic identifier and waits for connection within the default timeout.ETComClient(String progId, int timeout) Instantiates a newETComClientby initializing theETComDispatchwith given programmatic identifier and waits for connection within the given timeout. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanclosePackage(String path) Closes a package.booleancloseProject(String path) Closes a project.booleanexit()Same asexit(int)but without timeout.booleanexit(int timeout) Exits the currently running instance of the application (Hard Exit), preferComApplication.quit(int)instead.protected voidfinalize()Returns the analysis environment.Returns the cache module.Provides access to settings of the currently active test bench configuration file.Provides access to settings of the currently active test configuration file.Queries the list of loaded patches of the COM-Application.getSetting(String settingName) Queries the COM-Application setting value by name.Returns the test environment.Returns the test management module.Queries the COM-Application version.booleanimportProject(String path, String importPath, String importConfigPath, boolean replaceFiles) Imports a project from an archive.booleanChecks if the application process is running and ready to use.booleanReturns whether the currently selected test configuration and testbench configuration are started.openPackage(String path) Opens an existing package in COM-Application.openProject(String path) Same asopenProject(String, boolean, String)but with default parameters.openProject(String path, boolean execInCurrentPkgDir, String filterExpression) Opens an existing project in COM-Application.booleanOpens a test bench configuration file (*.tbc).booleanopenTestConfiguration(String path) Opens a test configuration file (*.tcf).booleanquit()Same asquit(int)but without timeout.booleanquit(int timeout) Exits the currently running instance of the application (Soft Exit).start()Starts up the currently loaded test configuration and testbench configuration files.stop()Stops the currently loaded test configuration and testbench configuration files.booleanUpdate all user libraries.booleanwaitForIdle(int timeout) Waits until the job count in the task manager reaches zero.
-
Constructor Details
-
ETComClient
Instantiates a newETComClientby initializing theETComDispatchwith the configured COM settings.- Throws:
ETComException- in case of a COM exception or if the timeout is reached
-
ETComClient
Instantiates a newETComClientby initializing theETComDispatchwith given programmatic identifier and waits for connection within the default timeout.- Parameters:
progId- the programmatic identifier- Throws:
ETComException- in case of a COM exception or if the timeout is reached
-
ETComClient
Instantiates a newETComClientby initializing theETComDispatchand waits for connection within the given timeout.- Parameters:
timeout- the timeout waiting for a connection- Throws:
ETComException- in case of a COM exception or if the timeout is reached
-
ETComClient
Instantiates a newETComClientby initializing theETComDispatchwith given programmatic identifier and waits for connection within the given timeout.- Parameters:
progId- the programmatic identifiertimeout- the timeout waiting for a connection- Throws:
ETComException- in case of a COM exception or if the timeout is reached
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
finalize
-
start
Description copied from interface:ComApplicationStarts up the currently loaded test configuration and testbench configuration files.- Specified by:
startin interfaceComApplication- Returns:
- the
ComTestEnvironmentdispatch - Throws:
ETComException- in case of a COM exception
-
stop
Description copied from interface:ComApplicationStops the currently loaded test configuration and testbench configuration files.- Specified by:
stopin interfaceComApplication- Returns:
- the
ComTestEnvironmentdispatch - Throws:
ETComException- in case of a COM exception
-
getTestEnvironment
Description copied from interface:ComApplicationReturns the test environment.- Specified by:
getTestEnvironmentin interfaceComApplication- Returns:
- the
ComTestEnvironmentdispatch - Throws:
ETComException- in case of a COM exception
-
getAnalysisEnvironment
Description copied from interface:ComApplicationReturns the analysis environment.- Specified by:
getAnalysisEnvironmentin interfaceComApplication- Returns:
- the
ComAnalysisEnvironmentdispatch - Throws:
ETComException- in case of a COM exception
-
getTestManagement
Description copied from interface:ComApplicationReturns the test management module.- Specified by:
getTestManagementin interfaceComApplication- Returns:
- the
ComTestEnvironmentdispatch - Throws:
ETComException- in case of a COM exception
-
getCaches
Description copied from interface:ComApplicationReturns the cache module.- Specified by:
getCachesin interfaceComApplication- Returns:
- the
ComCachesdispatch - Throws:
ETComException- in case of a COM exception
-
isApplicationRunning
Description copied from interface:ComApplicationChecks if the application process is running and ready to use.- Specified by:
isApplicationRunningin interfaceComApplication- Returns:
trueif application is already running,falseotherwise- Throws:
ETComException- in case of a COM exception
-
getVersion
Description copied from interface:ComApplicationQueries the COM-Application version.- Specified by:
getVersionin interfaceComApplication- Returns:
- the version string
- Throws:
ETComException- in case of a COM exception
-
getSetting
Description copied from interface:ComApplicationQueries the COM-Application setting value by name. Possible setting names are:- configPath
- errorLogFile
- generatorPath
- language
- logFile
- packagePath
- reportPath
- templatePath
- parameterPath
- traceStepPath
- userPyModulesPath
- utilityPath
- workspacePath
- offlineModelPath
- offlineSgbdPath
- offlineFiuPath
- settingsPath
- Specified by:
getSettingin interfaceComApplication- Parameters:
settingName- the setting name- Returns:
- the setting value or
nullif not defined - Throws:
ETComException- in case of a COM exception
-
getLoadedPatches
Description copied from interface:ComApplicationQueries the list of loaded patches of the COM-Application.- Specified by:
getLoadedPatchesin interfaceComApplication- Returns:
- the list of loaded patches
- Throws:
ETComException- in case of a COM exception
-
quit
Same asquit(int)but without timeout. Must be used for ecu.test below version 8.0.- Returns:
trueif successful- Throws:
ETComException- in case of a COM exception- See Also:
-
quit
Description copied from interface:ComApplicationExits the currently running instance of the application (Soft Exit). The optional timeout parameter was introduced with ecu.test 8.0.- Specified by:
quitin interfaceComApplication- Parameters:
timeout- the timeout in seconds before giving up to wait for application shutdown and raising an exception- Returns:
trueif successful- Throws:
ETComException- in case of a COM exception
-
exit
Same asexit(int)but without timeout. Must be used for ecu.test below version 8.0.- Returns:
trueif successful- Throws:
ETComException- in case of a COM exception- See Also:
-
exit
Description copied from interface:ComApplicationExits the currently running instance of the application (Hard Exit), preferComApplication.quit(int)instead. The optional timeout parameter was introduced with ecu.test 8.0.- Specified by:
exitin interfaceComApplication- Parameters:
timeout- the timeout in seconds before giving up to wait for application shutdown and raising an exception- Returns:
trueif successful- Throws:
ETComException- in case of a COM exception
-
openPackage
Description copied from interface:ComApplicationOpens an existing package in COM-Application.- Specified by:
openPackagein interfaceComApplication- Parameters:
path- the full path name of the package to open- Returns:
- the
ComPackagedispatch, if the package is successfully opened,nullotherwise - Throws:
ETComException- in case of a COM exception
-
closePackage
Description copied from interface:ComApplicationCloses a package.- Specified by:
closePackagein interfaceComApplication- Parameters:
path- the full path name of the package to close- Returns:
trueif the package was closed,falseotherwise- Throws:
ETComException- in case of a COM exception
-
openProject
Same asopenProject(String, boolean, String)but with default parameters.- Parameters:
path- the full path name of the project to open- Returns:
- the
ComProjectdispatch, if the project is successfully opened,nullotherwise - Throws:
ETComException- in case of a COM exception- See Also:
-
openProject
public ComProject openProject(String path, boolean execInCurrentPkgDir, String filterExpression) throws ETComException Description copied from interface:ComApplicationOpens an existing project in COM-Application.- Specified by:
openProjectin interfaceComApplication- Parameters:
path- the full path name of the project to openexecInCurrentPkgDir- defines whether relative references in the project are resolved starting from the current workspaces package directory or from the project file locationfilterExpression- a valid filter expression (see the main help document, section 'Projects')- Returns:
- the
ComProjectdispatch, if the project is successfully opened,nullotherwise - Throws:
ETComException- in case of a COM exception
-
closeProject
Description copied from interface:ComApplicationCloses a project.- Specified by:
closeProjectin interfaceComApplication- Parameters:
path- the full path name of the project to close- Returns:
trueif the project was closed,falseotherwise- Throws:
ETComException- in case of a COM exception
-
importProject
public boolean importProject(String path, String importPath, String importConfigPath, boolean replaceFiles) throws ETComException Description copied from interface:ComApplicationImports a project from an archive.- Specified by:
importProjectin interfaceComApplication- Parameters:
path- the full path name of the project to importimportPath- the full path name or a relative directory to the default package directory as the projects/packages destination directoryimportConfigPath- the full path name or a relative directory to the default configuration directory as the configurations destination directoryreplaceFiles- specifies whether files of same name should be replaced or left untouched- Returns:
- the
ComPackagedispatch, if the project was successfully imported,nullotherwise - Throws:
ETComException- in case of a COM exception
-
openTestbenchConfiguration
Description copied from interface:ComApplicationOpens a test bench configuration file (*.tbc).- Specified by:
openTestbenchConfigurationin interfaceComApplication- Parameters:
path- the full path name of the test bench configuration file to open- Returns:
trueif the configuration was successfully opened,falseotherwise- Throws:
ETComException- in case of a COM exception
-
openTestConfiguration
Description copied from interface:ComApplicationOpens a test configuration file (*.tcf).- Specified by:
openTestConfigurationin interfaceComApplication- Parameters:
path- the full path name of the test configuration file to open- Returns:
trueif the configuration was successfully opened,falseotherwise- Throws:
ETComException- in case of a COM exception
-
getCurrentTestConfiguration
Description copied from interface:ComApplicationProvides access to settings of the currently active test configuration file.- Specified by:
getCurrentTestConfigurationin interfaceComApplication- Returns:
- the
ComTestConfigurationdispatch - Throws:
ETComException- in case of a COM exception
-
getCurrentTestBenchConfiguration
Description copied from interface:ComApplicationProvides access to settings of the currently active test bench configuration file.- Specified by:
getCurrentTestBenchConfigurationin interfaceComApplication- Returns:
- the
ComTestBenchConfigurationdispatch - Throws:
ETComException- in case of a COM exception
-
isStarted
Description copied from interface:ComApplicationReturns whether the currently selected test configuration and testbench configuration are started.- Specified by:
isStartedin interfaceComApplication- Returns:
trueif configurations are started,falseotherwise- Throws:
ETComException- in case of a COM exception
-
waitForIdle
Description copied from interface:ComApplicationWaits until the job count in the task manager reaches zero. The timeout parameter specifies the maximum waiting time in seconds.- Specified by:
waitForIdlein interfaceComApplication- Parameters:
timeout- the timeout in seconds- Returns:
trueif a job count of zero was reached within the timeout- Throws:
ETComException- in case of a COM exception
-
updateUserLibraries
Description copied from interface:ComApplicationUpdate all user libraries. Only possible if neither a test nor the analysis is running.- Specified by:
updateUserLibrariesin interfaceComApplication- Returns:
trueif success,falseotherwise- Throws:
ETComException- in case of a COM exception
-