|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.mischiefbox.dmud.Server
Implements a DMUD server.
| Field Summary | |
protected ConnectionHandler |
connectionHandler
The connection handler. |
protected int |
iPort
The server port on which to listen. |
protected int |
iProcessorThreadsMax
The maximum number of processor threads. |
protected Listener |
listener
The listener. |
protected ProcessorThread[] |
paProcessor
The array of processor threads. |
static int |
PROCESSOR_THREAD_COUNT
The default number of processor threads. |
static String |
PROCESSOR_THREAD_GROUP
The default name of the processor thread group. |
protected InputQueue |
qInput
The common input queue. |
protected Queue |
qOutput
The common output queue. |
static int |
SERVER_PORT
The default port on which to listen. |
protected String |
sProcessorThreadGroup
The name of the processor thread group. |
protected ThreadGroup |
tgProcessor
The processor thread group. |
| Constructor Summary | |
Server()
Create a new server. |
|
| Method Summary | |
Listener |
getListener()
Get the listener. |
static void |
main(String[] args)
Command line method to start the server. |
void |
setPort(int iPort)
Set the server port. |
void |
setThreadCount(int iThreads)
Set the maximum number of processor threads. |
void |
setThreadGroupName(String sGroup)
Set the processor thread group name. |
void |
startServer()
Start this server. |
void |
stopServer()
Stop this server. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SERVER_PORT
public static final int PROCESSOR_THREAD_COUNT
The number of processor threads is directly proportional to the number of simultaneous commands that may be executed.
public static final String PROCESSOR_THREAD_GROUP
This is really only useful when debugging.
protected int iPort
protected int iProcessorThreadsMax
protected String sProcessorThreadGroup
protected InputQueue qInput
protected Queue qOutput
protected ConnectionHandler connectionHandler
protected Listener listener
protected ThreadGroup tgProcessor
protected ProcessorThread[] paProcessor
| Constructor Detail |
public Server()
| Method Detail |
public void setPort(int iPort)
This will not change the listening port on an already running server.
iPort - the server port on which to listen.public void setThreadCount(int iThreads)
This will not change the number of threads in an already running server.
iThreads - the number of processor threads to create.public void setThreadGroupName(String sGroup)
This will not change the processor thread group name in an already running server.
sGroup - the thread group name.public Listener getListener()
public void startServer()
public void stopServer()
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||