The ServerSocket listens continuously in a thread.
Whenever a client is connected a new thread a spawned which handles
the communication.
So, you will have to use multithreading. If you do not want to
multithread your application then may be you'll have to use the
SocketChannels etc. from the nio pkg.
If the above informaton is not enough, drop in a message...