()
| 133 | //SwingUtilities.invokeLater(new Runnable() { |
| 134 | Runnable r = new Runnable() { |
| 135 | public void run() { |
| 136 | try { |
| 137 | ServerSocket ss = new ServerSocket(port); |
| 138 | while (true) { |
| 139 | Socket s = ss.accept(); |
| 140 | WebServerWorker w = null; |
| 141 | synchronized (threads) { |
| 142 | if (threads.isEmpty()) { |
| 143 | WebServerWorker ws = new WebServerWorker(zip, entries); |
| 144 | ws.setSocket(s); |
| 145 | (new Thread(ws, "additional worker")).start(); |
| 146 | } else { |
| 147 | w = (WebServerWorker) threads.elementAt(0); |
| 148 | threads.removeElementAt(0); |
| 149 | w.setSocket(s); |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | } catch (IOException e) { |
| 154 | e.printStackTrace(); |
| 155 | } |
| 156 | } |
| 157 | }; |
| 158 | new Thread(r).start(); |
| 159 | // }); |
nothing calls this directly
no test coverage detected