Hi,
rajshkhr pandey wrote: How can I identify the thread corresponding to the user ...
Well, you could define e.g. a HashMap (username, created thread).
I guess this would be the easiest way ...
rajshkhr pandey wrote:... and how can I stop that thread?
You will have to declare some variable (usually a boolean), which is then checked in a loop (within a run method).
Beside this, you may also want to call an interrupt() ... just in case the thread is currently waiting or is blocked.
Hope this helps.
Regards,
Rok