Hello,
I am trying to write a java wrapper that could allow to expand current libvirt support for java to intercept invocations to the driver so new functionality can be added, for instance, automatically sending an accounting log of all libvirt invocations to an external server.
With the current implementation, the central point to do this seemed to be the interface libvirt.java, which defines an interface constant, INSTANCE, which is used all throughout the library to perform the invocations to the driver. My first idea was to create a wrapper for INSTANCE trying to replace it, but, as libvirt.java is an interface, INSTANCE cannot be reinitialized not overloaded. I might still try this by changing libvirt.java to an abstract class and INSTANCE to a static variable, but I do not think that changing the classes of the library is a good idea, especially for maintenance reasons. Does anybody know if there is any other way to define a wrapper for the invocations to the driver?
Best regards,
Darío Ruiz López