Ejemplo n.º 1
0
 public static synchronized void loadFile() throws IOException {
   File f = new File(instance.webhooksFile);
   Path path = f.toPath();
   StringBuilder fullFile = new StringBuilder();
   Files.lines(path).forEach(s -> fullFile.append(s));
   log.debug("Reading webhooks... " + fullFile.toString());
   instance.webhooks = instance.mapper.readValue(fullFile.toString(), Map.class);
 }
Ejemplo n.º 2
0
 public static synchronized void releaseFile() {
   instance.supportsFile = false;
   instance.webhooksFile = null;
 }
Ejemplo n.º 3
0
 public static synchronized void setFile(String file) {
   instance.supportsFile = true;
   instance.webhooksFile = file;
 }