Disconnect all clients and stop the server: internal use only.
()
| 274 | * Disconnect all clients and stop the server: internal use only. |
| 275 | */ |
| 276 | public void dispose() { |
| 277 | thread = null; |
| 278 | |
| 279 | if (clients != null) { |
| 280 | disconnectAll(); |
| 281 | clientCount = 0; |
| 282 | clients = null; |
| 283 | } |
| 284 | |
| 285 | try { |
| 286 | if (server != null) { |
| 287 | server.close(); |
| 288 | server = null; |
| 289 | } |
| 290 | } catch (IOException e) { |
| 291 | e.printStackTrace(); |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | |
| 296 | @Override |
no test coverage detected