MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / startServer

Method startServer

ij/src/main/java/ij/OtherInstance.java:186–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

184 static Implementation implementation;
185
186 @AstroImageJ(reason = "Replace method of cross-instance communication", modified = true)
187 public static void startServer() {
188 if (IJ.debugMode)
189 System.err.println("OtherInstance: starting server");
190 try {
191 var p = Path.of(getStubPath());
192
193 p.toFile().deleteOnExit();//todo FileLock?
194 new IPCServer(p, s -> {
195 try {
196 INSTANCE.sendArgument(s);
197 } catch (RemoteException ignored) {}
198 });
199 } catch (IOException e) {
200 e.printStackTrace();
201 }
202 }
203
204 private static final String OPTIONS = "prefs.options";
205 private static final int RUN_SOCKET_LISTENER=1<<22;

Callers 1

sendArgumentsMethod · 0.95

Calls 3

getStubPathMethod · 0.95
printlnMethod · 0.80
sendArgumentMethod · 0.65

Tested by

no test coverage detected