Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

ServerThread Class Reference

Inheritance diagram for ServerThread:

CacheServer::LoaderThread HttpThread List of all members.

Public Member Functions

 this (AbstractServer server, ServerSocket socket)
int run ()

Public Attributes

ServerSocket socket
AbstractServer server

Detailed Description

Subclasses Thread to provide the basic server-thread loop. This functionality could also be implemented as a delegate, however, we also wish to subclass in order to add thread-local data (see HttpThread).

Definition at line 56 of file ServerThread.d.


Member Function Documentation

this AbstractServer  server,
ServerSocket  socket
[inline]
 

Construct a ServerThread for the given Server, upon the specified socket

Reimplemented in HttpThread.

Definition at line 68 of file ServerThread.d.

References AbstractServer::socket.

int run  )  [inline]
 

Execute this thread until the Server says to halt. Each thread waits in the socket.accept() state, waiting for a connection request to arrive. Upon selection, a thread dispatches the request via the request service-handler and, upon completion, enters the socket.accept() state once more.

Definition at line 85 of file ServerThread.d.

References ServerSocket::accept(), ILogger::error(), ILogger::fatal(), AbstractServer::getLogger(), and AbstractServer::service().


Member Data Documentation

ServerSocket socket
 

Definition at line 58 of file ServerThread.d.

AbstractServer server
 

Definition at line 59 of file ServerThread.d.

Referenced by HttpBridge::this().


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:10 2004 for Mango by doxygen 1.3.6