Java Single Thread Client Server