Simulated quotes are generated by a CommonJ timer that publishes messages to a service integration bus topic space. The Web messaging service links a Dojo enabled client, a WebSphere Application Server internal message broker, and platform messaging for Web-based publication or subscription.
Communication is achieved through the Bayeux protocol. The cometd client, of the Dojo Toolkit, links incoming JavaScript Object Notation (JSON) messages to the Dojo event and topic system for processing.
In the QuoteStreamer Sample application, multiple Dojo widgets are specified in a market report summary article in HTML format. These Dojo widgets process incoming stock quote messages and visually indicate stock changes. These visual changes include: updates to the current price of a stock, daily stock price change, and daily stock percent price change. When the price of a stock changes, the daily price change and daily percent price change display with green (increase) or red (decrease) backgrounds before returning to the original background color.