|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deken.game.io.AbstractServer
public abstract class AbstractServer
Title: AbstractServer
Description: TODO
Copyright: Copyright (c) 2006
Field Summary | |
---|---|
static int |
DEFAULT_PORT
|
protected java.net.ServerSocket |
listener
|
protected int |
port
|
protected java.lang.Thread |
thread
|
Constructor Summary | |
---|---|
AbstractServer(int portNo)
|
Method Summary | |
---|---|
protected abstract void |
createService(java.net.Socket socket)
createService |
static void |
fail(java.lang.Exception e,
java.lang.String msg)
|
void |
run()
run |
void |
start()
start |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PORT
protected int port
protected java.net.ServerSocket listener
protected java.lang.Thread thread
Constructor Detail |
---|
public AbstractServer(int portNo)
Method Detail |
---|
public static void fail(java.lang.Exception e, java.lang.String msg)
public final void start()
Start this thread.
public void run()
The main workhorse of the server thread. It listens for an accepts connections from clients.
run
in interface java.lang.Runnable
protected abstract void createService(java.net.Socket socket)
Creates a service with the specified Socket.
socket
- Socket
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |