We have developed a set of Java Beans which help developers to quickly create MetBroker-enabled DSS. We are working toward releasing these beans as part of the MetBroker suite, but have not completed documentation of them. We hope also to package these beans as ActiveX components so that they can be used by developers using Visual Basic, Visual C++. Please contact us if you would like to be involved in further development and testing.

The beans encapsulate common tasks such as selecting a station from nested database, region, and station controls, or choosing an interval for which data is required. The beans are summarised in the following table:
 
Bean Picture Purpose
MetBroker (invisible) Manages link to MetBroker
MetSource Select database from list
MetRegion Select database region
MetStation Select station within region
StationDates Show period of operation of station
MetLogin Log user into database if required.
TimeZone Select query and result time zone
Interval Select request interval
ElementAndResolution Show data elements available from station and their resolution. Allow selection of elements to retrieve and their resolution
StationRequest Get station data
SpatialRequest Get spatial data
Using the beans provides all the usual benefits of shared code libraries - they speed development, and cut down on the maintenance required if the MetBroker interface changes. These beans can be easily linked so that, for example, the user code and password fields in are only enabled for databases that require these inputs. They hide some of the complexities associated with remote connections, such as the use of multithreading to mask latency. Developers can use these components to quickly develop MetBroker compatible applets and applications.

The figure below shows the beans and the interfaces and events used to link them together. We use the alternative UML “lollypop” notation for the interfaces. The beans use custom events to link to one another. As an example of how this mechanism works, the MetSourceBean notifies other beans when the user selects a new database. To be notified, beans must implement the interface MetSourceListener, and must register their interest by calling MetSourceBean’s addMetSourceListener method. The MetSourceEvent method sent by the MetSourceBean to the listening beans contains details about the newly selected database. In response to this event beans may request further information by querying MetBroker directly, for example the RegionBean would request a list of regions in the database, and then display and “announce” the first region in the list by broadcasting a RegionEvent to its listeners.

Back to MetBroker home page