I'm able to edit org.libvirt.Domain.java and print a message when, for
example suspend() is called. However I want to use eventCallback API of
libvirt.
Isn't this the proper piece of code to register a callback to any
domain(domain parameter is null), for a lifecycle event(event id 0).
conn.domainEventRegisterAny(null,
0,
new VirConnectDomainEventGenericCallback() {
public void eventCallback(ConnectionPointer cp,
DomainPointer dp, Pointer pntr) {
System.out.println("event!");
}
});
I can't get the println when I suspend or resume the domains. And the
reason I wrote "0" is that I could not find VIR_DOMAIN_EVENT_ID_LIFECYCLE
constant in java API. Any help about where to find macros,types and
enumerations in java API is appreciated. Unfortunately I can not find
anything about events in javadoc neither. Any comments?
Kind regards
Kadir
Show replies by date