public class ProxyObject extends java.lang.Object implements java.lang.reflect.InvocationHandler, IDispatch, IRawDispatchHandle, IConnectionPoint
The caller of the methods is responsible for correct initialization of the COM runtime and appropriate thread-handling - depending on the choosen handling model.
Constructor and Description |
---|
ProxyObject(java.lang.Class<?> theInterface,
IDispatch rawDispatch,
ObjectFactory factory) |
Modifier and Type | Method and Description |
---|---|
IComEventCallbackCookie |
advise(java.lang.Class<?> comEventCallbackInterface,
IComEventCallbackListener comEventCallbackListener)
Set up the comEventCallbackListener to receive callback events from the target COM object
|
void |
dispose() |
boolean |
equals(java.lang.Object arg) |
protected void |
finalize() |
<T> T |
getProperty(java.lang.Class<T> returnType,
OaIdl.DISPID dispID,
java.lang.Object... args) |
<T> T |
getProperty(java.lang.Class<T> returnType,
java.lang.String name,
java.lang.Object... args) |
IDispatch |
getRawDispatch() |
int |
hashCode() |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
<T> T |
invokeMethod(java.lang.Class<T> returnType,
OaIdl.DISPID dispID,
java.lang.Object... args) |
<T> T |
invokeMethod(java.lang.Class<T> returnType,
java.lang.String name,
java.lang.Object... args) |
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
IDispatch pDisp,
OaIdl.DISPID dispId)
Deprecated.
|
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
IDispatch pDisp,
OaIdl.DISPID dispId,
Variant.VARIANT pArg)
Deprecated.
|
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
IDispatch pDisp,
OaIdl.DISPID dispId,
Variant.VARIANT[] pArgs)
Deprecated.
|
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
IDispatch pDisp,
java.lang.String name)
Deprecated.
|
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
IDispatch pDisp,
java.lang.String name,
Variant.VARIANT pArg)
Deprecated.
|
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
IDispatch pDisp,
java.lang.String name,
Variant.VARIANT[] pArgs)
Deprecated.
|
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
OaIdl.DISPID dispId) |
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
OaIdl.DISPID dispId,
Variant.VARIANT pArg) |
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
OaIdl.DISPID dispId,
Variant.VARIANT[] pArgs) |
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
java.lang.String name) |
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
java.lang.String name,
Variant.VARIANT pArg) |
protected WinNT.HRESULT |
oleMethod(int nType,
Variant.VARIANT.ByReference pvResult,
java.lang.String name,
Variant.VARIANT[] pArgs) |
<T> T |
queryInterface(java.lang.Class<T> comInterface)
Returns a proxy object for the given interface.
|
protected OaIdl.DISPID |
resolveDispId(IDispatch pDisp,
java.lang.String name)
Deprecated.
|
protected OaIdl.DISPID |
resolveDispId(java.lang.String name) |
<T> void |
setProperty(OaIdl.DISPID dispId,
T value) |
<T> void |
setProperty(java.lang.String name,
T value) |
java.lang.String |
toString() |
void |
unadvise(java.lang.Class<?> comEventCallbackInterface,
IComEventCallbackCookie cookie)
Stop listening for callback events
|
public ProxyObject(java.lang.Class<?> theInterface, IDispatch rawDispatch, ObjectFactory factory)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void dispose()
public IDispatch getRawDispatch()
getRawDispatch
in interface IRawDispatchHandle
public boolean equals(java.lang.Object arg)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable
public IComEventCallbackCookie advise(java.lang.Class<?> comEventCallbackInterface, IComEventCallbackListener comEventCallbackListener) throws COMException
IConnectionPoint
advise
in interface IConnectionPoint
comEventCallbackInterface
- - the COM interface that the listener will receive events fromcomEventCallbackListener
- - and object that will receive the callback eventsCOMException
public void unadvise(java.lang.Class<?> comEventCallbackInterface, IComEventCallbackCookie cookie) throws COMException
IConnectionPoint
unadvise
in interface IConnectionPoint
comEventCallbackInterface
- - the interface that is being listened tocookie
- - the cookie that was returned when advise was calledCOMException
public <T> void setProperty(java.lang.String name, T value)
setProperty
in interface IDispatch
public <T> void setProperty(OaIdl.DISPID dispId, T value)
setProperty
in interface IDispatch
public <T> T getProperty(java.lang.Class<T> returnType, java.lang.String name, java.lang.Object... args)
getProperty
in interface IDispatch
public <T> T getProperty(java.lang.Class<T> returnType, OaIdl.DISPID dispID, java.lang.Object... args)
getProperty
in interface IDispatch
public <T> T invokeMethod(java.lang.Class<T> returnType, java.lang.String name, java.lang.Object... args)
invokeMethod
in interface IDispatch
public <T> T invokeMethod(java.lang.Class<T> returnType, OaIdl.DISPID dispID, java.lang.Object... args)
invokeMethod
in interface IDispatch
public <T> T queryInterface(java.lang.Class<T> comInterface) throws COMException
IUnknown
Will throw COMException if an error occurs trying to retrieve the requested interface, see exception cause for details.
queryInterface
in interface IUnknown
COMException
protected OaIdl.DISPID resolveDispId(java.lang.String name)
protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, java.lang.String name, Variant.VARIANT pArg) throws COMException
COMException
protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, OaIdl.DISPID dispId, Variant.VARIANT pArg) throws COMException
COMException
protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, java.lang.String name) throws COMException
COMException
protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, OaIdl.DISPID dispId) throws COMException
COMException
protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, java.lang.String name, Variant.VARIANT[] pArgs) throws COMException
COMException
protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, OaIdl.DISPID dispId, Variant.VARIANT[] pArgs) throws COMException
COMException
@Deprecated protected OaIdl.DISPID resolveDispId(IDispatch pDisp, java.lang.String name)
@Deprecated protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, IDispatch pDisp, java.lang.String name, Variant.VARIANT pArg) throws COMException
COMException
@Deprecated protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, IDispatch pDisp, OaIdl.DISPID dispId, Variant.VARIANT pArg) throws COMException
COMException
@Deprecated protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, IDispatch pDisp, java.lang.String name) throws COMException
COMException
@Deprecated protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, IDispatch pDisp, OaIdl.DISPID dispId) throws COMException
COMException
@Deprecated protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, IDispatch pDisp, java.lang.String name, Variant.VARIANT[] pArgs) throws COMException
COMException
@Deprecated protected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, IDispatch pDisp, OaIdl.DISPID dispId, Variant.VARIANT[] pArgs) throws COMException
COMException