Hello,
i am using kivy and pyjnius for an application on a raspberry pi. For a new device i want to integrate a java library to access the device. But his java library expects the user to register callbacks which whould be implemented from a nested interface in the class. And i can not find out how to declare this in Pyjnius. Can anybody help ?
The class looks like this:
////////////////////////////////////////////////////////////////////////////////////////////////////////
package CCVCH.OPI;
//many imports
public class FlowManager {
//some private data
//Access to the callbacks
public synchronized void addCashierDisplayListener(CashierDisplayListener listener) {
this.listeners.add(CashierDisplayListener.class, listener);
}
public synchronized void removeCashierDisplayListener(CashierDisplayListener listener) {
this.listeners.remove(CashierDisplayListener.class, listener);
}
//more callback functions
//constructors
public FlowManager(String terminalIPAddress, int IPPort0, int IPPort1, int timeout, String logFileName) throws IOException {
InitializeFlowManager(terminalIPAddress, IPPort0, IPPort1, IPPort0, IPPort1, timeout, 0, logFileName, 1, 2,
"99999");
}
//many more constructors
public FlowManager(String terminalIPAddress, int IPPort0, int IPPort1, int timeout, String logFileName, String merchantPassword) throws IOException {
InitializeFlowManager(terminalIPAddress, IPPort0, IPPort1, IPPort0, IPPort1, timeout, 0, logFileName, 1, 2,
merchantPassword);
}
//many private and public functions
// declarations of the interfaces
public static interface CashierDisplayListener extends EventListener {
void handleCashierDisplay(FlowManagerEventArgs param1FlowManagerEventArgs);
}
//many more interfaces
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////
So i want to somehow implement the
CashierDisplayListener interface with pyjnius and use it with the
addCashierDisplayListenerfunction.
I am gratefull for any hints on how i can do this.
kind regards,
Dominik Wenger