title: lightweight publish/subscribe framework in java
body: <p>Is there a good lightweight framework for java that provides the publish/subscribe pattern?</p>
  
  <p>Some ideal features</p>
  
  <ul>
  <li>Support for generics</li>
  <li>Registration of multiple subscribers to a publisher</li>
  <li>API primarily interfaces and some useful implementations</li>
  <li>purely in-memory, persistence and transaction guarantees not required.</li>
  </ul>
  
  <p>I know about JMS but that is overkill for my need. The publish/subscribed data are the result of scans of a file system, with scan results being fed to another component for processing, which are then processed before being fed to another and so on. </p>
  
  <p>EDIT:
  All within the same process. PropertyChangeListener from beans doesn't quite cut it, since it's reporting changes on properties, rather than publishing specific items. I could shoehorn ProprtyChangeListener to work by having a "last published object" property, and so published objects. PropertyChangeListeners don't support generics, and are entrenched in property change semantics, rather than pure publish/subscribe. The java.util Observer/Observable pattern would be good, but Oberver is a concrete class.</p>