|
a/tool/src/www/WebServer.java |
|
b/tool/src/www/WebServer.java |
|
... |
|
... |
126 |
} catch (IOException ex) {
|
126 |
} catch (IOException ex) {
|
127 |
log.write(is.ERROR, "Web server error. Couldn't open port %1: %2"
|
127 |
log.write(is.ERROR, "Web server error. Couldn't open port %1: %2"
|
128 |
,portNumber , ex.getMessage());
|
128 |
,portNumber , ex.getMessage());
|
129 |
}
|
129 |
}
|
130 |
}
|
130 |
}
|
|
|
131 |
|
|
|
132 |
/**
|
|
|
133 |
* stop the server in case it was already running
|
|
|
134 |
*/
|
|
|
135 |
public void stopServer() {
|
|
|
136 |
try {
|
|
|
137 |
this.connection.close();
|
|
|
138 |
log.write(is.CLOSE, "Web server was closed");
|
|
|
139 |
} catch (IOException ex) {
|
|
|
140 |
Logger.getLogger(WebServer.class.getName()).log(Level.SEVERE, null, ex);
|
|
|
141 |
}
|
|
|
142 |
}
|
131 |
|
143 |
|
132 |
class Task implements Runnable {
|
144 |
class Task implements Runnable {
|
133 |
|
145 |
|
134 |
private final Response response;
|
146 |
private final Response response;
|
135 |
private final Request request;
|
147 |
private final Request request;
|