MCPcopy Index your code
hub / github.com/zaproxy/zaproxy / run

Method run

zap/src/main/java/org/zaproxy/zap/DaemonBootstrap.java:71–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69 new Runnable() {
70
71 @Override
72 public void run() {
73 Control control;
74 try {
75 control = initControl();
76 } catch (IllegalStateException e) {
77 System.err.println("Failed to start ZAP. " + e.getMessage());
78 return;
79 }
80
81 warnAddOnsAndExtensionsNoLongerRunnable();
82
83 if (!handleCmdLineSessionArgsSynchronously(control)) {
84 return;
85 }
86
87 HeadlessBootstrap.checkForUpdates();
88
89 try {
90 // Allow extensions to pick up command line args in daemon mode
91 control.getExtensionLoader().hookCommandLineListener(getArgs());
92 recordStartStats();
93 control.runCommandLine();
94 } catch (ShutdownRequestedException e) {
95 control.shutdown(false);
96 LOGGER.info("{} terminated.", Constant.PROGRAM_TITLE);
97 return;
98 } catch (Exception e) {
99 LOGGER.error(e.getMessage(), e);
100 }
101
102 // This is the only non-daemon thread, so should keep running
103 // CoreAPI.handleApiAction uses System.exit to shutdown
104 while (true) {
105 try {
106 Thread.sleep(100000);
107
108 } catch (InterruptedException e) {
109 // Ignore
110 }
111 }
112 }
113 });
114
115 t.setName("ZAP-daemon");

Callers

nothing calls this directly

Calls 15

checkForUpdatesMethod · 0.95
runCommandLineMethod · 0.95
shutdownMethod · 0.95
initControlMethod · 0.80
getExtensionLoaderMethod · 0.80
recordStartStatsMethod · 0.80
infoMethod · 0.80
getMessageMethod · 0.65
printlnMethod · 0.45

Tested by

no test coverage detected