title: Share data between java threads
body: <p>I'm working on a program right now that is a UDP server tied to a GUI administration interface. The UDP server runs as its own class and implements the <code>Runnable</code> interface. </p>
  
  <p>I decided that the best way to design the program would be to have the UDP server run as a thread in the background, and just update the GUI when an event happens (e.g. a user successfully authenticates to the service).</p>
  
  <p>I'm not quite sure what data structure to use to pass information between the threads when the GUI thread is not waiting (per se) on this information in that it is performing other tasks as well. I've seen some classes like <code>Futures</code>, but these only tell you when the task is done (not really a priority here) and the <code>BlockingQueue</code> interface, but using a <code>Queue</code> solution seems like I'd have to repeatedly poll the Queue until information was pushed onto it, and then react based upon what information was pushed onto the Queue.</p>
  
  <p>Is there a data structure that I can use to "send" data from the server up to the GUI so it can update accordingly? </p>