Package com.ms.com |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public final class DispatchProxy { // Constructors public DispatchProxy(Class exposedInterface, Object dispatch); public DispatchProxy(Class exposedInterface, Object dispatch, _Guid iid, Method dispIDMethods[], int dispIDs[]); // Methods public Class getExposedInterface(); public Object getUnderlyingObject(); public void disconnectAsEventSink(); protected native void finalize(); }
The DispatchProxy class wraps a dispatchable object with a Java interface.
public DispatchProxy(Class exposedInterface, Object dispatch);Allocates a new DispatchProxy object. All calls against this object on the exposed interface are translated to IDispatch::Invoke calls on the supplied dispatchable object. For this constructor, the first call to each method calls IDispatch::GetIDsOfNames to find the DISPID of the method, which is then cached. All IDispatch calls are made on the object's IID_IDispatch identity.
Parameter Description exposedInterface The signature of the IDispatch call. dispatch The object that IDispatch calls.
public DispatchProxy(Class exposedInterface, Object dispatch, _Guid iid, Method dispIDMethods[], int dispIDs[]);Allocates a new DispatchProxy object. All calls against this object on the exposed interface are translated to IDispatch::Invoke calls on the supplied dispatchable object.
The supplied list of methods and DISPIDs are used to preassign the DISPIDs for the exposed interface's methods. All unassigned methods call IDispatch::GetIDsOfNames to find the DISPID of the method, which is then cached. All IDispatch calls are made on the supplied interface ID, which defaults to IID_IDispatch.
Parameter Description exposedInterface The signature of the IDispatch call. dispatch The object that IDispatch calls. iid The supplied interface ID. The IID parameter defaults to IID_IDispatch. dispIDMethods The list of methods used to preassign the DISPIDs for the exposed interface's methods. dispIDs The list of DISPIDs used to preassign the DISPIDs for the exposed interface's methods.
public Class getExposedInterface();Retrieves the Java interface that is used as the template for IDispatch calls.
Return Value:
Returns the Java interface that is used as the template for IDispatch calls.
public Object getUnderlyingObject();Retrieves the underlying object that is called by IDispatch.
Return Value:
Returns the underlying dispatchable object.
public void disconnectAsEventSink();Disconnects this object from the underlying object. All future calls on a method with a non-void return type throw a NullPointerException.
Return Value:
No return value.
protected native void finalize();Releases native resources.
Return Value:
No return value.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.