com.jacob.activeX

## Class ActiveXInvocationProxy

- java.lang.Object
- - com.jacob.com.InvocationProxy
  - - com.jacob.activeX.ActiveXInvocationProxy

-     public class ActiveXInvocationProxy
      extends InvocationProxy

  RELEASE 1.12 EXPERIMENTAL.

  This class that lets event handlers receive events with all java objects as parameters. The standard Jacob event methods all accept an array of Variant objects. When using this class, you can set up your event methods as regular java methods with the correct number of parameters of the correct java type. This does NOT work for any event that wishes to accept a call back and modify the calling parameters to tell windows what to do. An example is when an event lets the receiver cancel the action by setting a boolean flag to false. The java objects cannot be modified and their values will not be passed back into the originating Variants even if they could be modified.

  This class acts as a proxy between the windows event callback mechanism and the Java classes that are looking for events. It assumes that all of the Java classes that are looking for events implement methods with the same names as the windows events and that the implemented methods native java objects of the type and order that match the windows documentation. The methods can return void or a Variant that will be returned to the calling layer. All Event methods that will be recognized by InvocationProxyAllEvents have the signature `void eventMethodName(Object,Object...)` or `Object eventMethodName(Object,Object...)`

- - ### Field Summary

    - ### Fields inherited from class com.jacob.com.InvocationProxy

      `mTargetObject`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ActiveXInvocationProxy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Variant` | `invoke(java.lang.String methodName, Variant[] targetParameters)` The method actually invoked by EventProxy.cpp.

    - ### Methods inherited from class com.jacob.com.InvocationProxy

      `getVariant, setTarget`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ActiveXInvocationProxy

          public ActiveXInvocationProxy()

  - ### Method Detail

    - #### invoke

          public Variant invoke(java.lang.String methodName,
                                Variant[] targetParameters)

      Description copied from class: `InvocationProxy`
      The method actually invoked by EventProxy.cpp. The method name is calculated by the underlying JNI code from the MS windows Callback function name. The method is assumed to take an array of Variant objects. The method may return a Variant or be a void. Those are the only two options that will not blow up.

      Subclasses that override this should make sure mTargetObject is not null before processing.

      Specified by:
        `invoke` in class `InvocationProxy`
      Parameters:
        `methodName` - name of method in mTargetObject we will invoke
        `targetParameters` - Variant[] that is the single parameter to the method
      Returns:
        an object that will be returned to the com event caller

http://jacob-project.sourceforge.net