Inheritance diagram for AbstractServer:
Public Member Functions | |
this (InternetAddress bind, int threads, int backlog, ILogger logger=null) | |
void | service (ServerThread thread, IConduit conduit) |
char[] | getRemoteAddress (IConduit conduit) |
char[] | getRemoteHost (IConduit conduit) |
int | getPort () |
char[] | getHost () |
ILogger | getLogger () |
void | start () |
Protected Member Functions | |
abstract char[] | toString () |
abstract ServerSocket | createSocket (InternetAddress bind, int backlog) |
abstract ServerThread | createThread (ServerSocket socket) |
Private Member Functions | |
char[] | getProtocol () |
Private Attributes | |
InternetAddress | bind |
int | threads |
int | backlog |
ServerSocket | socket |
ILogger | logger |
Definition at line 60 of file AbstractServer.d.
|
Setup this server with the requisite attributes. The number of threads specified dictate exactly that. You might have anything between 1 thread and several hundred, dependent upon the underlying O/S and hardware. Parameter 'backlog' specifies the max number of"simultaneous" connection requests to be handled by an underlying socket implementation. Definition at line 81 of file AbstractServer.d. |
|
Concrete server must expose a name Implemented in ClusterServer, CacheServer, and HttpServer. |
|
Concrete server must expose a ServerSocket factory Implemented in ClusterServer, CacheServer, and HttpServer. Referenced by start(). |
|
Concrete server must expose a ServerThread factory Implemented in ClusterServer, CacheServer, and HttpServer. Referenced by start(). |
|
Concrete server must expose a service handler Reimplemented in ClusterServer, CacheServer, and HttpServer. Referenced by ServerThread::run(). |
|
Provide support for figuring out the remote address Reimplemented from IServer. Definition at line 134 of file AbstractServer.d. References InternetAddress::toAddrString(). |
|
Provide support for figuring out the remote host. Not currently implemented. Reimplemented from IServer. Definition at line 151 of file AbstractServer.d. |
|
Return the local port we're attached to Reimplemented from IServer. Definition at line 162 of file AbstractServer.d. References InternetAddress::port(). |
|
Return the local address we're attached to Reimplemented from IServer. Definition at line 174 of file AbstractServer.d. References InternetAddress::toAddrString(). |
|
Return the logger associated with this server Definition at line 186 of file AbstractServer.d. Referenced by ServerThread::run(), CacheServer::LoaderThread::this(), and ClusterServer::this(). |
|
Start this server Reimplemented in ClusterServer. Definition at line 197 of file AbstractServer.d. References backlog, bind, createSocket(), createThread(), ILogger::info(), and threads. Referenced by TaskServer::start(), ClusterServer::start(), and testServer(). |
|
Return the protocol in use. Reimplemented in ClusterServer, CacheServer, and HttpServer. Referenced by HttpRequest::getServerScheme(). |
|
Definition at line 62 of file AbstractServer.d. |
|
Definition at line 63 of file AbstractServer.d. |
|
Definition at line 64 of file AbstractServer.d. |
|
Definition at line 65 of file AbstractServer.d. Referenced by ServerThread::this(). |
|
Definition at line 66 of file AbstractServer.d. |