|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.anotheria.net.shared.server.AbstractServer
net.anotheria.net.tcp.server.BasicTCPServer
public class BasicTCPServer
A basic server for tcp connections.
| Constructor Summary | |
|---|---|
BasicTCPServer(int aPort,
IConnectionFactory conFactory)
Creates a new server with the given port and connection factory. |
|
| Method Summary | |
|---|---|
boolean |
isRunning()
Returns true if the server is running |
void |
run()
|
void |
setRunning(boolean aRunning)
Used to stop the server by stoping the thread. |
void |
startServer()
Starts the server |
void |
stopServer()
Stops the server. |
| Methods inherited from class net.anotheria.net.shared.server.AbstractServer |
|---|
addServerListener, getConnectionFactory, notifyConnectionCreated, notifyConnectionRemoved, removeServerListener, setConnectionFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicTCPServer(int aPort,
IConnectionFactory conFactory)
aPort - the port to listen to.conFactory - | Method Detail |
|---|
public void startServer()
throws ServerException
IServer
startServer in interface IServerServerExceptionpublic void run()
run in interface Runnablepublic void stopServer()
stopServer in interface IServerpublic boolean isRunning()
public void setRunning(boolean aRunning)
running - false if the server has to be stoped.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||