- From: Christopher William Turner <cwturner@cycom.co.uk>
- Date: Wed, 28 Oct 1998 06:36:21 -0500 (EST)
- To: Tadashi NAKANO <tnakano@ise.eng.osaka-u.ac.jp>
- CC: www-jigsaw@w3.org
Tadashi NAKANO wrote: > And when a client connect, the daemon allocates a thread the client. > If that I think is correct, please tell me the thread class name. > The httpd process accepts the client connect inorg.w3c.jigsaw.http.httpd.run(); and then passes the connected socket to org.w3c.jigsaw.http.socket.SocketClientFactory.handleConnection(Socket); this method binds the socket to a org.w3c.jigsaw.http.socket.SocketClient object which is associated with a thread obtained from a thread cache. See org.w3c.jigsaw.http.socket.SocketClientFactory.run(); The threadcache is org.w3c.util.ThreadCache and it contains thread instances of type org.w3c.util.CachedThread. be aware that the connection is normally kept alive and so you only see this startup sequence during the first page access by a browser. From then on the same connections get reused. Typically a browser will provoke 3 connections. There are some debug flags private static final boolean debug = false; private static final boolean debugthread = false; in org.w3c.jigsaw.http.socket.SocketClientFactory which you can set true to get some thread information. This kind of sequence information can sometimes be hard to find by inspection in object oriented source code. The UML process (see www.rational.com) suggests sequence diagrams for showing this aspect of an implementation. Chris Turner, www.cycom.co.uk
Received on Wednesday, 28 October 1998 06:50:37 UTC