The InfoBus is Java standard extension originally developed
by Lotus for Kona/eSuite to support communication between
Applications and/or Applets within the same virtual machine.
See
http://java.sun.com/beans/infobus/
Any questions about what follows, please contact StefanBorg.
__InfoBus Spec Summary__
- InfoBus interfaces form a tightly typed contract between cooperating beans. No inferring is required, and procedure calls are direct.
- The semantics of the data flow are based on interpreting the contents of data that flows across the InfoBus interfaces, not in the names or parameters from events, nor in the names or parameters of callbacks.
- Beans in an InfoBus application can be classified in three types: data producers, data consumers, and data controllers. An individual component can act as both data producer and data consumer. Between components, data flows in named objects known as "data items." Data controllers are specialized components that mediate the rendezvous between producers and consumers.
- The InfoBus must support semantics that allow data to be communicated in a canonical format for consumption by multiple consumers. A canonical format involves both the encoding of data (numbers, strings, etc.) and navigation of data structure (rows, columns, tuples, etc.). Our intent is that mechanisms used to format and recover data be based as closely as possible on mechanisms already available from Java itself and JavaBeans.
The InfoBus protocol for data exchange consists of the major steps below.
- Membership -- establishing InfoBus participation
This is done by implementing an InfoBusMember, obtaining an InfoBus instance, and having the member join it.
- Membership is typically established during class initialization before the start() method is called.
- Listening for InfoBus events
- A data consumer can receive announcements about data availability by adding an InfoBusDataConsumer listener to the bus via addDataConsumer.
- A data producer can receive requests for data by adding an InfoBusDataProducer listener via addDataProducer.
- Listeners are normally added during the processing of the start() method (or its moral equivalent) and removed during the processing of the stop() method.
- Rendezvous on the data to be exchanged
- Data producers "announce" the availability of new data.
- Consumers solicit data from producers as they require that data.
- It is up to the application designer to designate the names for data items that can be exchanged.
- Navigation of structured data
In practice, this sort of information sharing requires consumer and producer to agree on a common encoding of the data. We have designed a set of interfaces for one such protocol, which we call DataItems.
- Retrieval of an encoding of the data value
- A DataItem can be retrieved as a String or a Java object.
- For complex reinterpretations of underlying data, the DataItem provides an optional method that returning a Transferable object, which exposes the DataItem's DataFlavors, as described in documentation at:
http://java.sun.com/products/JDK/1.1/docs/api/Package-java.awt.datatransfer.html
Content of these pages are owned and copyrighted by the poster.
|
Hosted by:
|
|