Package com.ibm.di.automation
Class COMProxy
- java.lang.Object
-
- com.ibm.di.automation.COMProxy
-
public class COMProxy extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VARIANTcall(java.lang.Object disp, int dispid)Calls IDispatch::invokev for the property/method exposed by the object.VARIANTcall(java.lang.Object disp, int dispid, java.lang.Object a1)Calls IDispatch::invoke for the property/method exposed by the object.VARIANTcall(java.lang.Object disp, java.lang.String name)Provides access to properties and methods exposed by an object.VARIANTcall(java.lang.Object disp, java.lang.String name, java.lang.Object a1)Calls IDispatch::invoke for the property/method exposed by the object.VARIANTcall(java.lang.Object disp, java.lang.String name, java.lang.Object a1, java.lang.Object a2)Calls IDispatch::invoke for the property/method exposed by the object.VARIANTcall(java.lang.Object disp, java.lang.String name, java.lang.Object a1, java.lang.Object a2, java.lang.Object a3)Calls IDispatch::invoke for the property/method exposed by the object.VARIANTcall(java.lang.Object disp, java.lang.String name, java.lang.Object a1, java.lang.Object a2, java.lang.Object a3, java.lang.Object a4)Calls IDispatch::invoke for the property/method exposed by the object.static COMProxycreate()Create singular instance of COMProxyIDispatchcreateInstance(java.lang.String progID)create separate instances of automation object IDispatchVARIANTget(java.lang.Object disp, int dispid)Calls IDispatch::invoke for the property exposed by the object, with wFlags=DISPATCH_PROPERTYGETVARIANTget(java.lang.Object disp, java.lang.String name)Calls IDispatch::invoke for the property exposed by the object, with wFlags=DISPATCH_PROPERTYGETint[]getIDsOfNames(java.lang.Object disp, java.lang.String[] names)Maps a single member and an optional set of argument names to a corresponding set of integer DISPIDs, which can be used on subsequent calls to IDispatch::Invoke.BSTRnewBSTR(java.lang.String data)create new BSTR objectVARIANTnewVariant(int type, java.lang.Object data)create VARIANT with specific typevoidput(java.lang.Object disp, int dispid, java.lang.Object val)Calls IDispatch::invoke for the property exposed by the object with wFlags = DISPATCH_PROPERTYPUTvoidput(java.lang.Object disp, java.lang.String name, java.lang.Object val)Calls IDispatchinvoke for the property exposed by the object with wFlags = DISPATCH_PROPERTYPUTvoidputRef(java.lang.Object disp, int dispid, java.lang.Object val)Calls IDispatch::invoke for the property exposed by the object, with wFlags=DISPATCH_PROPERTYPUTREFvoidputRef(java.lang.Object disp, java.lang.String name, java.lang.Object val)Calls IDispatch::invoke for the property exposed by the object, with wFlags=DISPATCH_PROPERTYPUTREFjava.lang.ObjectQueryInterface(java.lang.Object disp, java.lang.String iid)calls IDispatch object's QueryInterfacevoidrelease(java.lang.Object disp)call this to explicitly release the com object before gc
-
-
-
Method Detail
-
create
public static COMProxy create() throws java.lang.Exception
Create singular instance of COMProxy- Returns:
- singular COMProxy instance null if running on a non windows machine COMProxy does not make sense on a non windows machine
- Throws:
java.lang.Exception
-
createInstance
public IDispatch createInstance(java.lang.String progID)
create separate instances of automation object IDispatch- Parameters:
progID- program identifier- Returns:
- IDispatch object
-
QueryInterface
public java.lang.Object QueryInterface(java.lang.Object disp, java.lang.String iid) throws COMErrorcalls IDispatch object's QueryInterface- Parameters:
disp- IDispatch objectiid- Identifier of the interface being requested- Returns:
- Returns pointers to supported interfaces
- Throws:
COMError
-
release
public void release(java.lang.Object disp) throws COMErrorcall this to explicitly release the com object before gc- Parameters:
disp- IDispatch object that needs to be released- Throws:
COMError
-
getIDsOfNames
public int[] getIDsOfNames(java.lang.Object disp, java.lang.String[] names) throws COMErrorMaps a single member and an optional set of argument names to a corresponding set of integer DISPIDs, which can be used on subsequent calls to IDispatch::Invoke.- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)names- array of method names- Returns:
- disp ID's of methods
- Throws:
COMError
-
call
public VARIANT call(java.lang.Object disp, java.lang.String name) throws COMError
Provides access to properties and methods exposed by an object.- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)name- name of the method/property to be invoked.- Returns:
- return value of the method invoked
- Throws:
COMError
-
call
public VARIANT call(java.lang.Object disp, java.lang.String name, java.lang.Object a1) throws COMError
Calls IDispatch::invoke for the property/method exposed by the object.- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)name- name of the method/property to be invoked.a1-- Returns:
- return value of the method invoked
- Throws:
COMError
-
call
public VARIANT call(java.lang.Object disp, java.lang.String name, java.lang.Object a1, java.lang.Object a2) throws COMError
Calls IDispatch::invoke for the property/method exposed by the object.- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)name- name of the method/property to be invoked.a1-a2-- Returns:
- return value of the method invoked
- Throws:
COMError
-
call
public VARIANT call(java.lang.Object disp, java.lang.String name, java.lang.Object a1, java.lang.Object a2, java.lang.Object a3) throws COMError
Calls IDispatch::invoke for the property/method exposed by the object.- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)name- name of the method/property to be invoked.a1-a2-a3-- Returns:
- return value of the method invoked
- Throws:
COMError
-
call
public VARIANT call(java.lang.Object disp, java.lang.String name, java.lang.Object a1, java.lang.Object a2, java.lang.Object a3, java.lang.Object a4) throws COMError
Calls IDispatch::invoke for the property/method exposed by the object.- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)name- name of the method/property to be invoked.a1-a2-a3-a4-- Returns:
- return value of the method invoked
- Throws:
COMError
-
call
public VARIANT call(java.lang.Object disp, int dispid) throws COMError
Calls IDispatch::invokev for the property/method exposed by the object.- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)dispid- Identifies the member. Use GetIDsOfNames or the object's documentation to obtain the dispatch identifier- Returns:
- return value of the method invoked
- Throws:
COMError
-
call
public VARIANT call(java.lang.Object disp, int dispid, java.lang.Object a1) throws COMError
Calls IDispatch::invoke for the property/method exposed by the object.- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)dispid- Identifies the member. Use GetIDsOfNames or the object's documentation to obtain the dispatch identifiera1-- Returns:
- return value of the method invoked
- Throws:
COMError
-
put
public void put(java.lang.Object disp, java.lang.String name, java.lang.Object val) throws COMErrorCalls IDispatchinvoke for the property exposed by the object with wFlags = DISPATCH_PROPERTYPUT- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)name- name of the propertyval- value to be set- Throws:
COMError
-
put
public void put(java.lang.Object disp, int dispid, java.lang.Object val) throws COMErrorCalls IDispatch::invoke for the property exposed by the object with wFlags = DISPATCH_PROPERTYPUT- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)dispid- Identifies the member. Use GetIDsOfNames or the object's documentation to obtain the dispatch identifierval-- Throws:
COMError
-
get
public VARIANT get(java.lang.Object disp, java.lang.String name) throws COMError
Calls IDispatch::invoke for the property exposed by the object, with wFlags=DISPATCH_PROPERTYGET- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)name- name of the method/property to be invoked.- Returns:
- return value of the method invoked
- Throws:
COMError
-
get
public VARIANT get(java.lang.Object disp, int dispid) throws COMError
Calls IDispatch::invoke for the property exposed by the object, with wFlags=DISPATCH_PROPERTYGET- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)dispid- Identifies the member. Use GetIDsOfNames or the object's documentation to obtain the dispatch identifier- Returns:
- value of the property
- Throws:
COMError
-
putRef
public void putRef(java.lang.Object disp, java.lang.String name, java.lang.Object val) throws COMErrorCalls IDispatch::invoke for the property exposed by the object, with wFlags=DISPATCH_PROPERTYPUTREF- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)name- name of the method/property to be invoked.val- value of the property- Throws:
COMError
-
putRef
public void putRef(java.lang.Object disp, int dispid, java.lang.Object val) throws COMErrorCalls IDispatch::invoke for the property exposed by the object, with wFlags=DISPATCH_PROPERTYPUTREF- Parameters:
disp- java IDispatch(or COMProxy) object, obtained as a result of system.createCOMInstance(String progID)dispid- Identifies the member. Use GetIDsOfNames or the object's documentation to obtain the dispatch identifierval- value of the property- Throws:
COMError
-
newVariant
public VARIANT newVariant(int type, java.lang.Object data) throws COMError
create VARIANT with specific type- Parameters:
type- refer to the COMConstant typesdata- data- Returns:
- VARIANT object
- Throws:
COMError
-
-