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.Objectjava.lang.Throwablepublic void dispose()
public IDispatch getRawDispatch()
getRawDispatch in interface IRawDispatchHandlepublic boolean equals(java.lang.Object arg)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic 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.InvocationHandlerjava.lang.Throwablepublic IComEventCallbackCookie advise(java.lang.Class<?> comEventCallbackInterface, IComEventCallbackListener comEventCallbackListener) throws COMException
IConnectionPointadvise in interface IConnectionPointcomEventCallbackInterface - - the COM interface that the listener will receive events fromcomEventCallbackListener - - and object that will receive the callback eventsCOMExceptionpublic void unadvise(java.lang.Class<?> comEventCallbackInterface,
IComEventCallbackCookie cookie)
throws COMException
IConnectionPointunadvise in interface IConnectionPointcomEventCallbackInterface - - the interface that is being listened tocookie - - the cookie that was returned when advise was calledCOMExceptionpublic <T> void setProperty(java.lang.String name,
T value)
setProperty in interface IDispatchpublic <T> void setProperty(OaIdl.DISPID dispId, T value)
setProperty in interface IDispatchpublic <T> T getProperty(java.lang.Class<T> returnType,
java.lang.String name,
java.lang.Object... args)
getProperty in interface IDispatchpublic <T> T getProperty(java.lang.Class<T> returnType,
OaIdl.DISPID dispID,
java.lang.Object... args)
getProperty in interface IDispatchpublic <T> T invokeMethod(java.lang.Class<T> returnType,
java.lang.String name,
java.lang.Object... args)
invokeMethod in interface IDispatchpublic <T> T invokeMethod(java.lang.Class<T> returnType,
OaIdl.DISPID dispID,
java.lang.Object... args)
invokeMethod in interface IDispatchpublic <T> T queryInterface(java.lang.Class<T> comInterface)
throws COMException
IUnknownWill throw COMException if an error occurs trying to retrieve the requested interface, see exception cause for details.
queryInterface in interface IUnknownCOMExceptionprotected 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
COMExceptionprotected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, OaIdl.DISPID dispId, Variant.VARIANT pArg) throws COMException
COMExceptionprotected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, java.lang.String name) throws COMException
COMExceptionprotected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, OaIdl.DISPID dispId) throws COMException
COMExceptionprotected WinNT.HRESULT oleMethod(int nType, Variant.VARIANT.ByReference pvResult, java.lang.String name, Variant.VARIANT[] pArgs) throws COMException
COMExceptionprotected 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