I'm working on a program where part of it will be working as a chat between different people. I'm trying to figure out the best way to send and receive messages.
A PrintWriter or something similar won't work because the process will stop at the read()
method while waiting for a message to be sent to it. I'd like to check to see if there is a new message, and if not, continue the execution.
I've seen some stuff about JMS, but I haven't done enough research to determine if it's up for this job.
Is JMS the best option for this, or is there a better way?