|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectits.element.ConnectionDaemon
Manages a thread that accepts client requests on a server socket and spawns an instance of OutputBuffer in a new thread for each client it accepts.
| Constructor Summary | |
ConnectionDaemon(int requestPort,
AccessManager accessManager,
OutputQueue dataQueue)
|
|
ConnectionDaemon(int requestPort,
OutputQueue dataQueue)
Creates a server socket listening to the given port and creates a new thread to execute this object's run method. |
|
| Method Summary | |
protected boolean |
authorized(java.net.Socket client)
Placeholder for function to check if client is authorized to connect. |
int |
getClientCount()
|
void |
run()
Main loop for ConnectionDaemon thread. |
void |
setAccessManager(AccessManager am)
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConnectionDaemon(int requestPort,
OutputQueue dataQueue)
throws java.io.IOException
requestPort - the port on which to listen for connection attemptsdataQueue - the object used as a source of ItsFrames to pass to connected clients
public ConnectionDaemon(int requestPort,
AccessManager accessManager,
OutputQueue dataQueue)
throws java.io.IOException
| Method Detail |
public void setAccessManager(AccessManager am)
public void run()
run in interface java.lang.Runnableprotected boolean authorized(java.net.Socket client)
public void stop()
public int getClientCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||