[Simpleweb-Support] aren't "Dispacher-n" threads already asynchronous?
Brought to you by:
niallg
From: -=}\\*/{=- <rui...@gm...> - 2012-07-06 21:59:50
|
hi, i read your tutorial, apart of being outdated, i do not understand how the threads work... is not a server configured as in first example of the tutorial already asynchronous? here is an output of my logs... and it seams asynchronous... i did have to synchronize the logger: I: Dispatcher-68 @ 12.07.06.21.59.31 [1341608371407] ! @ abc.kis.handler.kml.KMLHandler I: Dispatcher-68 @ 12.07.06.21.59.31 [1341608371438] ! 286ms: localhost:8086/ I: Dispatcher-70 @ 12.07.06.21.59.31 [1341608371446] * localhost:8086/static/script/color.js I: Dispatcher-69 @ 12.07.06.21.59.31 [1341608371459] * localhost:8086/css/base.css I: Dispatcher-70 @ 12.07.06.21.59.31 [1341608371507] > localhost >>> kis.alphabit.org I: Dispatcher-69 @ 12.07.06.21.59.31 [1341608371511] > localhost >>> kis.alphabit.org I: Dispatcher-70 @ 12.07.06.21.59.31 [1341608371518] > kis.alphabit.org >>> common I: Dispatcher-69 @ 12.07.06.21.59.31 [1341608371523] i want to control the timeout for each request handling... so i would like to better understand what is the best approach. thank you, best wishes, rui ps: bellow is the method that i use to start the Container (ie. this) public void start() { logI("Starting server at %1$s.", portsToString()); try { connection = new SocketConnection(this); for (int port: ports) try { connection.connect(new InetSocketAddress(port)); } catch (IOException ioe) { logE("Unable to connect to port %1$d: %2$s", port, ioe.getMessage()); } } catch (IOException ioe) { logE("Unable to create a %1$s: %2$s", SocketConnection.class.getName(), ioe.getMessage()); } if (ps.length() > 0) logI("Server started at:%1$s", ps); } |