--- src/main/java/org/libvirt/event/ConnectionCloseListener.java | 9 +++++++++ src/main/java/org/libvirt/event/ConnectionCloseReason.java | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/main/java/org/libvirt/event/ConnectionCloseListener.java create mode 100644 src/main/java/org/libvirt/event/ConnectionCloseReason.java diff --git a/src/main/java/org/libvirt/event/ConnectionCloseListener.java b/src/main/java/org/libvirt/event/ConnectionCloseListener.java new file mode 100644 index 0000000..f6e8973 --- /dev/null +++ b/src/main/java/org/libvirt/event/ConnectionCloseListener.java @@ -0,0 +1,9 @@ +package org.libvirt.event; + +import org.libvirt.Connect; + +public interface ConnectionCloseListener extends EventListener { + + void onClose(Connect connection, ConnectionCloseReason reason); + +} diff --git a/src/main/java/org/libvirt/event/ConnectionCloseReason.java b/src/main/java/org/libvirt/event/ConnectionCloseReason.java new file mode 100644 index 0000000..0e94452 --- /dev/null +++ b/src/main/java/org/libvirt/event/ConnectionCloseReason.java @@ -0,0 +1,8 @@ +package org.libvirt.event; + +public enum ConnectionCloseReason { + VIR_CONNECT_CLOSE_REASON_ERROR, + VIR_CONNECT_CLOSE_REASON_EOF, + VIR_CONNECT_CLOSE_REASON_KEEPALIVE, + VIR_CONNECT_CLOSE_REASON_CLIENT; +} -- 1.8.4.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list