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
public class ETComDispatch extends com.jacob.com.Dispatch implements AutoCloseable
Custom dispatch to perform requests on application specific COM API.All threads from COM will be automatically released after performing the requests.
-
-
Constructor Summary
Constructors Constructor Description ETComDispatch(boolean useTimeout)
Instantiates a newETComDispatch
with default programmatic identifier.ETComDispatch(com.jacob.com.Dispatch dispatch, boolean useTimeout)
Instantiates a newETComDispatch
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes thisETComDispatch
quietly.protected void
finalize()
boolean
isAttached()
protected com.jacob.com.Variant
performDirectRequest(String method)
Performs a direct synchronous request on thisETComDispatch
, invoking the given method and waiting for the result.protected com.jacob.com.Variant
performDirectRequest(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.Variant
performRequest(String method)
Performs a request on thisETComDispatch
, invoking the given method.protected com.jacob.com.Variant
performRequest(String method, int timeout)
Performs a request on thisETComDispatch
, invoking the given method.protected com.jacob.com.Variant
performRequest(String method, int timeout, Object... params)
Performs a request on thisETComDispatch
, invoking the given method with parameters.protected com.jacob.com.Variant
performRequest(String method, Object... params)
Performs a request on thisETComDispatch
, invoking the given method with parameters.boolean
useTimeout()
Returns 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, safeRelease
-
-
-
-
Constructor Detail
-
ETComDispatch
public ETComDispatch(boolean useTimeout)
Instantiates a newETComDispatch
with 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 Detail
-
useTimeout
public boolean useTimeout()
Returns whether to apply COM timeout.- Returns:
true
if positive timeout is set,false
otherwise
-
performRequest
protected com.jacob.com.Variant performRequest(String method) throws ETComException
Performs a request on thisETComDispatch
, invoking the given method.- Parameters:
method
- the specific COM API method name- Returns:
- the
Variant
returned by underlying callN - Throws:
ETComException
- the underlyingJacobException
-
performRequest
protected com.jacob.com.Variant performRequest(String method, int timeout) throws ETComException
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
Variant
returned 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
Variant
returned 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
Variant
returned by underlying callN - Throws:
ETComException
- the underlyingJacobException
-
performDirectRequest
protected com.jacob.com.Variant performDirectRequest(String method) throws ETComException
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
Variant
returned 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
Variant
returned by underlying callN - Throws:
ETComException
- the underlyingJacobException
-
isAttached
public boolean isAttached()
- Overrides:
isAttached
in classcom.jacob.com.Dispatch
-
close
public void close()
Closes thisETComDispatch
quietly.- Specified by:
close
in interfaceAutoCloseable
-
finalize
protected void finalize()
- Overrides:
finalize
in classcom.jacob.com.Dispatch
-
-