37 lines
789 B
Java
37 lines
789 B
Java
package com.frostwire.jlibtorrent.demo;
|
|
|
|
import com.frostwire.jlibtorrent.AlertListener;
|
|
import com.frostwire.jlibtorrent.SessionManager;
|
|
import com.frostwire.jlibtorrent.alerts.Alert;
|
|
|
|
/**
|
|
* @author gubatron
|
|
* @author aldenml
|
|
*/
|
|
public final class SessionTest {
|
|
|
|
public static void main(String[] args) throws Throwable {
|
|
|
|
SessionManager s = new SessionManager();
|
|
|
|
s.addListener(new AlertListener() {
|
|
@Override
|
|
public int[] types() {
|
|
return null;
|
|
}
|
|
|
|
@Override
|
|
public void alert(Alert<?> alert) {
|
|
System.out.println(alert);
|
|
}
|
|
});
|
|
|
|
s.start();
|
|
|
|
System.out.println("Press ENTER to exit");
|
|
System.in.read();
|
|
|
|
s.stop();
|
|
}
|
|
}
|