|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object forward.server.ServerSocketManager
public class ServerSocketManager
This class manages a ServerSocket for a ForwardScheduler.
Field Summary | |
---|---|
private java.lang.Thread |
m_managerThread
The internal thread, which accepts the client connections and forwards them to the ForwardScheduler. |
private ForwardScheduler |
m_parentScheduler
This is the ForwardScheduler, which owns this ServerManager. |
private int |
m_portNumber
This is the portnumber the ServerSocket listens on. |
private java.net.ServerSocket |
m_serverSocket
The associated ServerSocket which listens for all client connections. |
private static int |
MAXIMUM_CONNECTION_REQUESTS
This is the maximum number of unanswered connection requests (connections, which are not accepted yet). |
Constructor Summary | |
---|---|
ServerSocketManager(int a_portNumber)
This creates a new ServerManager. |
Method Summary | |
---|---|
java.lang.Object |
getId()
Returns the ID of this ServerSocketManager. |
void |
run()
This is the implementation of the internal thread. |
void |
shutdown()
This method must be called, if the ServerManager shall come to an end. |
void |
startServerManager(ForwardScheduler a_parentScheduler)
This starts the ServerManager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int MAXIMUM_CONNECTION_REQUESTS
private java.net.ServerSocket m_serverSocket
private java.lang.Thread m_managerThread
private ForwardScheduler m_parentScheduler
private int m_portNumber
Constructor Detail |
---|
public ServerSocketManager(int a_portNumber)
a_portNumber
- The port of the listening server socket. This is the port where clients
can connect to.Method Detail |
---|
public java.lang.Object getId()
getId
in interface IServerManager
public void startServerManager(ForwardScheduler a_parentScheduler) throws java.lang.Exception
startServerManager
in interface IServerManager
a_parentScheduler
- This is the ForwardScheduler where all new connections are reported
to.
java.lang.Exception
public void shutdown()
shutdown
in interface IServerManager
public void run()
run
in interface java.lang.Runnable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |