Class ETComDispatch
java.lang.Object
com.jacob.com.JacobObject
com.jacob.com.Dispatch
de.tracetronic.jenkins.plugins.ecutest.wrapper.com.ETComDispatch
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
AbstractTestObject,AnalysisEnvironment,AnalysisExecutionInfo,Cache,Caches,Constants,TestBenchConfiguration,TestConfiguration,TestEnvironment,TestExecutionInfo,TestManagement
Custom dispatch to perform requests on application specific COM API.
All threads from COM will be automatically released after performing the requests.
-
Field Summary
Fields inherited from class com.jacob.com.Dispatch
fdexNameCaseSensitive, Get, LOCALE_SYSTEM_DEFAULT, m_pDispatch, Method, Put, PutRef -
Constructor Summary
ConstructorsConstructorDescriptionETComDispatch(boolean useTimeout) Instantiates a newETComDispatchwith default programmatic identifier.ETComDispatch(com.jacob.com.Dispatch dispatch, boolean useTimeout) Instantiates a newETComDispatch. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes thisETComDispatchquietly.protected voidfinalize()booleanprotected com.jacob.com.VariantperformDirectRequest(String method) Performs a direct synchronous request on thisETComDispatch, invoking the given method and waiting for the result.protected com.jacob.com.VariantperformDirectRequest(String method, Object... params) Performs a direct synchronous request on thisETComDispatch, invoking the given method with parameters and waiting for the result.protected com.jacob.com.VariantperformRequest(String method) Performs a request on thisETComDispatch, invoking the given method.protected com.jacob.com.VariantperformRequest(String method, int timeout) Performs a request on thisETComDispatch, invoking the given method.protected com.jacob.com.VariantperformRequest(String method, int timeout, Object... params) Performs a request on thisETComDispatch, invoking the given method with parameters.protected com.jacob.com.VariantperformRequest(String method, Object... params) Performs a request on thisETComDispatch, invoking the given method with parameters.booleanReturns whether to apply COM timeout.Methods inherited from class com.jacob.com.Dispatch
call, call, call, call, callN, callN, callN_CaseSensitive, callSub, callSub, callSub, callSub, callSubN, callSubN, coCreateInstance, get, get, get_CaseSensitive, getActiveInstance, getIDOfName, getIDsOfNames, getIDsOfNames, getProgramId, hasExited, hasExited, invoke, invoke, invoke, invokeSub, invokeSub, invokeSub, invokeSubv, invokeSubv, invokeSubv, invokev, invokev, invokev, invokev, put, put, put_Casesensitive, putRef, putRef, QueryInterface, safeReleaseMethods inherited from class com.jacob.com.JacobObject
debug, getBuildDate, getBuildVersion, isDebugEnabled
-
Constructor Details
-
ETComDispatch
public ETComDispatch(boolean useTimeout) Instantiates a newETComDispatchwith default programmatic identifier.- Parameters:
useTimeout- specifies whether to apply timeout
-
ETComDispatch
public ETComDispatch(com.jacob.com.Dispatch dispatch, boolean useTimeout) Instantiates a newETComDispatch.This constructor is used instead of a case operation to turn a Dispatch object into a wider object - it must exist in every wrapper class whose instances may be returned from method calls wrapped in VT_DISPATCH Variants.
- Parameters:
dispatch- the dispatchuseTimeout- specifies whether to apply timeout
-
-
Method Details
-
useTimeout
public boolean useTimeout()Returns whether to apply COM timeout.- Returns:
trueif positive timeout is set,falseotherwise
-
performRequest
Performs a request on thisETComDispatch, invoking the given method.- Parameters:
method- the specific COM API method name- Returns:
- the
Variantreturned by underlying callN - Throws:
ETComException- the underlyingJacobException
-
performRequest
Performs a request on thisETComDispatch, invoking the given method. Respects the given timeout and aborts the dispatch call if timeout exceeded.- Parameters:
method- the specific COM API method nametimeout- the timeout in seconds- Returns:
- the
Variantreturned by underlying callN - Throws:
ETComException- the underlyingJacobException
-
performRequest
protected com.jacob.com.Variant performRequest(String method, Object... params) throws ETComException Performs a request on thisETComDispatch, invoking the given method with parameters.- Parameters:
method- the parameterized COM API method nameparams- the parameters for the method- Returns:
- the
Variantreturned by underlying callN - Throws:
ETComException- the underlyingJacobException
-
performRequest
protected com.jacob.com.Variant performRequest(String method, int timeout, Object... params) throws ETComException Performs a request on thisETComDispatch, invoking the given method with parameters. Respects the given timeout and aborts the dispatch call if timeout exceeded.- Parameters:
method- the parameterized COM API method nametimeout- the timeout in secondsparams- the parameters for the method- Returns:
- the
Variantreturned by underlying callN - Throws:
ETComException- the underlyingJacobException
-
performDirectRequest
Performs a direct synchronous request on thisETComDispatch, invoking the given method and waiting for the result.- Parameters:
method- the specific COM API method name- Returns:
- the
Variantreturned by underlying callN - Throws:
ETComException- the underlyingJacobException
-
performDirectRequest
protected com.jacob.com.Variant performDirectRequest(String method, Object... params) throws ETComException Performs a direct synchronous request on thisETComDispatch, invoking the given method with parameters and waiting for the result.- Parameters:
method- the parameterized COM API method nameparams- the parameters for the method- Returns:
- the
Variantreturned by underlying callN - Throws:
ETComException- the underlyingJacobException
-
isAttached
public boolean isAttached()- Overrides:
isAttachedin classcom.jacob.com.Dispatch
-
close
public void close()Closes thisETComDispatchquietly.- Specified by:
closein interfaceAutoCloseable
-
finalize
protected void finalize()- Overrides:
finalizein classcom.jacob.com.Dispatch
-