private static String DIR = ".";
public static void main(String[] args) throws Exception {
System.out
.println("XLLServer v0.0.1 - searching current directory for addins...");
final FunctionServer fs = new FunctionServer();
final CompositeFunctionHandler cfh = new CompositeFunctionHandler();
final FunctionInformationHandler fifh = new FunctionInformationHandler();
FileSystemWatcher fsw = new FileSystemWatcher(new File(DIR),
new CallbackAdaptor() {
public void fileAdded(File f) {
registerAddin(f, fifh, cfh);
}
});
cfh.add(fifh);
fsw.setPauseMillis(1000);
fsw.start();
fs.setFunctionHandler(new DebugFunctionHandler(cfh));
fs.run();
}