Thursday, January 7, 2010
01-07-2010
Need to add basic administrative commands to the server. We need to be able to cleanly shut the thing down. Figured out to properly use the Executor class to control muliple threads. I use it to run the accept listener and the connection listener. If you call shutdownNow() and make sure your thread loops all check to see if the thread has been interrupted then things will shutdown cleanly. I do have one issue to solve, however. The application that gets spawns probably won't be in a loop so they return and their thread dies. How do we keep the application thread running in a non-invasive way?
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment