Qore jni Module  1.0.1
Jni::org::qore::jni::QoreInvocationHandler Class Reference

Represents an invocation handler used to implement callback from Java to Qore. More...

Inherits InvocationHandler.

Public Member Methods

 constructor (code dispatcher)
 Creates a new invocation handler. More...
 
nothing destroy ()
 Explicitly destroys the invocation handler even if it is still reachable from Java.
 
auto invoke (auto object, *Jni::java::lang::reflect::Method method, softlist< auto > vargs)
 invocation method for the handler More...
 

Detailed Description

Represents an invocation handler used to implement callback from Java to Qore.

Member Function Documentation

◆ constructor()

Jni::org::qore::jni::QoreInvocationHandler::constructor ( code  dispatcher)

Creates a new invocation handler.

Parameters
dispatchera function that implements the dispatching, see example
Example:
QoreInvocationHandler h(any sub(Jni::Method m, *list args) {
# handle invocation of method m with arguments args
});

◆ invoke()

auto Jni::org::qore::jni::QoreInvocationHandler::invoke ( auto  object,
*Jni::java::lang::reflect::Method  method,
softlist< auto >  vargs 
)

invocation method for the handler

Exceptions
ERROR-UNSUPPORTEDwhen called from Qore; currently this can only be invoked from Java

The documentation for this class was generated from the following file: