• Category Archives General
  • General Category

  • [Java] Daemon Console Reader

    So, I was recently Team programming with one of my clan mates on a project for stat collection he was working on. He wanted help with class structure and how to organize his code. So we both booted up eclipse and using Saros (Paired Programming over a network; I highly recommend you check it out!) we got to work. After several hours and some intense programming we came up with the skeleton of the program. We had the Driver, the actual Daemon, and the worker threads. We were about finished when it occurred to me, “How do we gracefully shut down this puppy?” It has no GUI and killing from the task manager isn’t very graceful. The answer was to read input from the console and act upon it. Thus I present to you my adventures in creating a console reader!