MCPcopy Create free account
hub / github.com/BaseXdb/basex / run

Method run

basex-api/src/main/java/org/basex/BaseXHTTP.java:397–418  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

395 }
396
397 @Override
398 public void run() {
399 try {
400 while(true) {
401 Util.println(HTTP + " STOP " + SRV_STARTED_PORT_X, stopPort);
402 try(Socket s = socket.accept()) { /* no action */ }
403 if(stopFile.exists()) {
404 socket.close();
405 Util.println(HTTP + " STOP " + SRV_STOPPED_PORT_X, stopPort);
406 jetty.stop();
407 hc.close();
408 Prop.clear();
409 if(!stopFile.delete()) {
410 context.log.writeServer(LogType.ERROR, Util.info(FILE_NOT_DELETED_X, stopFile));
411 }
412 break;
413 }
414 }
415 } catch(final Exception ex) {
416 Util.stack(ex);
417 }
418 }
419 }
420}

Callers

nothing calls this directly

Calls 10

printlnMethod · 0.95
clearMethod · 0.95
infoMethod · 0.95
stackMethod · 0.95
writeServerMethod · 0.80
acceptMethod · 0.65
closeMethod · 0.65
existsMethod · 0.45
stopMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected