public class ActiveXDispatchEvents extends DispatchEvents
Use this exactly like the DispatchEvents class. This class plugs in an ActiveXInvocationProxy instead of an InvocationProxy. It is the ActiveXInvocationProxy that implements the reflection calls and invoke the found java event callbacks. See ActiveXInvocationProxy for details.
Constructor and Description |
---|
ActiveXDispatchEvents(Dispatch sourceOfEvent,
java.lang.Object eventSink)
This is the most commonly used constructor.
|
ActiveXDispatchEvents(Dispatch sourceOfEvent,
java.lang.Object eventSink,
java.lang.String progId)
None of the samples use this constructor.
|
ActiveXDispatchEvents(Dispatch sourceOfEvent,
java.lang.Object eventSink,
java.lang.String progId,
java.lang.String typeLib)
Creates the event callback linkage between the the MS program represented
by the Dispatch object and the Java object that will receive the
callback.
|
Modifier and Type | Method and Description |
---|---|
protected InvocationProxy |
getInvocationProxy(java.lang.Object pTargetObject)
Returns an instance of the proxy configured with pTargetObject as its
target
|
finalize, safeRelease
debug, getBuildDate, getBuildVersion, isDebugEnabled
public ActiveXDispatchEvents(Dispatch sourceOfEvent, java.lang.Object eventSink)
Creates the event callback linkage between the the MS program represented by the Dispatch object and the Java object that will receive the callback.
sourceOfEvent
- Dispatch object who's MS app will generate callbackseventSink
- Java object that wants to receive the eventspublic ActiveXDispatchEvents(Dispatch sourceOfEvent, java.lang.Object eventSink, java.lang.String progId)
Creates the event callback linkage between the the MS program represented by the Dispatch object and the Java object that will receive the callback.
sourceOfEvent
- Dispatch object who's MS app will generate callbackseventSink
- Java object that wants to receive the eventsprogId
- ???public ActiveXDispatchEvents(Dispatch sourceOfEvent, java.lang.Object eventSink, java.lang.String progId, java.lang.String typeLib)
>ActiveXDispatchEvents de = new ActiveXDispatchEvents(someDispatch,someEventHAndler, "Excel.Application", "C:\\Program Files\\Microsoft Office\\OFFICE11\\EXCEL.EXE");
sourceOfEvent
- Dispatch object who's MS app will generate callbackseventSink
- Java object that wants to receive the eventsprogId
- , mandatory if the typelib is specifiedtypeLib
- The location of the typelib to useprotected InvocationProxy getInvocationProxy(java.lang.Object pTargetObject)
DispatchEvents
getInvocationProxy
in class DispatchEvents
http://jacob-project.sourceforge.net