Prabhakar V. Chaganti<firstname.lastname@example.org>
Banjo is a non-gui bean that provides the consumer application with a list of the ten latest applications posted on http://freshmeat.net.
You can use Banjo in two different ways:
- Push method: Create a Banjo object and call its getApps() method whenever you need the new list.
- Pull method: Implement the FmNewAppsListener interface , create Banjo and add yourself as a listener. In this case, you will get callbacks with the new apps list at the time interval(in millisecs) determined by you.
The tarball includes two sample classes in the /samples dir: BanjoDriver1 and BanjoDriver2 that demonstrate the two ways that you can incorporate Banjo into your application.
Banjo also checks the last modified attribute for the backend file, so it will not needlessly parse the xml if nothing has been modified. Therefore you will NOT get any callbacks if nothing has changed on the freshmeat backend !!!
You will need a reasonably recent version of an JAXP XML parser. I use Xerces from the Apache project.
Ensure that Banjo-1.0.jar is on your application classpath.