Java Bindings ConnectAuthDefault callback never called

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm following the instructions mentioned in the list some years ago about using a subclass of ConnectAuth using ConnectAuthDefault as a sample:

"You could create your own
subclass of ConnectAuth, and override the method:"


public abstract int callback(Credential[] cred);

What I'm doing is just "copying" ConnectAuthDefault to ConnectAuthAlternate and using exactly the same code. The thing is that the callback defined in that class never fires:

ConnectAuth defaultAuth = new ConnectAuthAlternate();

try{

conn = new Connect("qemu+ssh://student@10.164.1.21/system", defaultAuth, 0);

} catch

  (LibvirtException e){ System.out.println("exception caught:"+e);

  System.out.println(e.getError());

}


It works as expected, asks for the user password and connects successfully but it never reaches the callback defined in ConnectAuthAlternate (aka ConnectAuthDefault):

@Override

public int callback(Credential[] cred) {

BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

[...]


I'm using libvirt-java 0.5.1, JNA 4.1 and the current libvirt version that comes with ubuntu 13.10: 1.1.1-0ubuntu8.5


Could you give some light about this?.

Sergio.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]