X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FRemoteLibrary.java;h=06370320fb94a6709f543e859841d4e176e4f8de;hb=468b960ba378ae71230f475d3e97521e133ec019;hp=9453d674e1df4c18f8ffd959b7f5ab916bf971e9;hpb=fd1d31c20100442f3c2480b8177a2df761613a15;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/library/RemoteLibrary.java b/src/be/nikiroo/fanfix/library/RemoteLibrary.java index 9453d67..0637032 100644 --- a/src/be/nikiroo/fanfix/library/RemoteLibrary.java +++ b/src/be/nikiroo/fanfix/library/RemoteLibrary.java @@ -270,6 +270,27 @@ public class RemoteLibrary extends BasicLibrary { "Operation not supportorted on remote Libraries"); } + /** + * Stop the server. + */ + public void exit() { + try { + new ConnectActionClientObject(host, port, true) { + @Override + public void action(Version serverVersion) throws Exception { + send(new Object[] { md5, "EXIT" }); + } + + @Override + protected void onError(Exception e) { + Instance.getTraceHandler().error(e); + } + }.connect(); + } catch (IOException e) { + Instance.getTraceHandler().error(e); + } + } + @Override protected List getMetas(Progress pg) { final Progress pgF = pg;