title: Implementing observer pattern over RMI
body: <p>I'm trying to put together an RMI chat server that features multiple rooms. However, being new to RMI, I'm unsure of how to implement the observer pattern properly, or if my premise actually makes any sense.</p>
  
  <p>I have a <code>ChatServer</code> object, and a <code>ChatUser</code> (client) object. The <code>ChatServer</code> contains a list of <code>ChatRoom</code> objects.</p>
  
  <p>Each <code>ChatRoom</code> extends <code>UnicastRemoteObject</code>. However, I wish to implement the observer pattern here, and have <code>ChatRoom</code> also extend <code>Observable</code>, which of course can't be done in Java.</p>
  
  <p>The idea was to use the observer pattern to have all the clients receive updates when a <code>ChatRoom</code> receives a new message.</p>
  
  <p>I was wondering if there's a way of actually implementing some sort of observer pattern in such a situation? I've had a preliminary check on Google, but most of the solutions I come across tend to be very convoluted or are a bit too over the top.</p>
  
  <p>Otherwise, is there something fundamentally wrong with the way I'm doing things here (from the very brief idea I've given)?</p>
  
  <p>Thanks in advance ;)</p>