Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1030471 // serverSocketFactory_autoUpdate

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (4664L) is out of date.

1  
static AutoCloseable serverSocketFactory_autoUpdate(IF0<AutoCloseable> enter default null) { 
2  
  temp new CloseablesHolder resources;
3  
  new FileWatchService watchService;
4  
  resources.add(watchService);
5  
  
6  
  File dir = mkdirs(javaxSecretDir());
7  
  watchService.addRecursiveListener(dir, f -> {
8  
    temp getVar(enter);
9  
    if (fileNameIs(f, "keystore.p12")) {
10  
      print("Key store changed, reloading certificates: " + f);
11  
      serverSocketFactory_botCompanyEtc_update();
12  
    }
13  
  });
14  
  print("Watching " + dir + " for keystore changes");
15  
  ret resources.takeOut(watchService);
16  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030471
Snippet name: serverSocketFactory_autoUpdate
Eternal ID of this version: #1030471/4
Text MD5: e441de0549953b069883e7de9160bcdf
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-07-10 15:06:31
Source code size: 591 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 144 / 202
Version history: 3 change(s)
Referenced in: [show references]