Changeset 1991 for trunk/autoquest-httpmonitor/src/main/java/de/ugoe/cs/autoquest/httpmonitor/HttpMonitor.java
- Timestamp:
- 07/08/15 09:03:46 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-httpmonitor/src/main/java/de/ugoe/cs/autoquest/httpmonitor/HttpMonitor.java
r1384 r1991 22 22 * <p> 23 23 * The HTTP monitor starts a web server ({@link HttpMonitorServer}) that receives exchanges 24 * of the HTTP proxy. These exchanges are logged using the {@link HttpMonitorLogManager}. The 25 * class assures that on shutdown e.g. caused by CTRL-C the server and the log manager are 26 * stopped correctly. 24 * of the HTTP proxy. In addition, it provides via get a unique ordering id for requests and 25 * responses that can be used by the proxies when creating the exchanges. The exchanges are 26 * logged using the {@link HttpMonitorLogManager}. The class assures that on shutdown e.g. caused 27 * by CTRL-C the server and the log manager are stopped correctly. 27 28 * </p> 28 29 * … … 50 51 */ 51 52 private HttpMonitorLogManager logManager; 53 54 /** 55 * the id generator used for getting new unique ids 56 */ 57 private IdGenerator idGenerator; 52 58 53 59 /** … … 92 98 93 99 try { 100 idGenerator = new SimpleIdGenerator(); 101 idGenerator.init(); 102 94 103 logManager = new HttpMonitorLogManager(logFileBaseDir); 95 104 logManager.init(); 96 105 97 Servlet servlet = new HttpMonitorServlet(logManager );106 Servlet servlet = new HttpMonitorServlet(logManager, idGenerator); 98 107 server = new HttpMonitorServer(port, servlet); 99 108 server.init(); … … 118 127 try { 119 128 Runtime.getRuntime().addShutdownHook(shutdownHook); 129 idGenerator.start(); 120 130 logManager.start(); 121 131 server.start(); … … 139 149 server.stop(); 140 150 logManager.stop(); 151 idGenerator.stop(); 141 152 142 153 server = null; 143 154 logManager = null; 155 idGenerator = null; 144 156 } 145 157
Note: See TracChangeset
for help on using the changeset viewer.