Hi all
I'm new to this list, I've been making use of the Libvirt Java bindings recently. I wanted to make use of domain events yesterday so my application can be alerted when the state of a domain changes etc.
However I quickly discovered that domain events are completely broken in the current Java bindings. Whilst some of the Libvirt
functions required to support domain events are exposed, the critical underpinnings are not. Specifically there is no support
for setting up the event loop.
event IDs:
* VIR_DOMAIN_EVENT_ID_LIFECYCLE
* VIR_DOMAIN_EVENT_ID_REBOOT
* VIR_DOMAIN_EVENT_ID_RTC_CHANGE
soon.
con.domainEventRegisterAny(DomainEventID.VIR_DOMAIN_EVENT_ID_LIFECYCLE, new DomainLifecycleEventHandler() {
@Override
public void onStarted(Connect connection, Domain domain, DomainEventType event, DomainEventStartedDetailType detail) throws LibvirtException {
System.out.println("Got start event: " + event + "::" + detail + " for domain " + domain.getName());
}
});
should be simple to merge. The changes can be viewed at:
https://github.com/intrbiz/libvirt-java/compare/master...ce-domain-events
in the free() handling.
Any advice / thoughts / comments welcome.
Regards,
Chris Ellis
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list