In earlier releases of this product, data flowed through the product using a proprietary XML message format. This proprietary format was used exclusively for RFID solutions, and extending it to any sensor event type would have been difficult, if not impossible.
WebSphere® Sensor Events uses generic events. This means that there is event processing that applies to RFID solutions, as well as any sensor events, such as, temperature change. Generic events are extendable and can be customized to fit any customer requirements.
WebSphere Sensor Events still uses XML data, but instead of a proprietary XML format, the product uses Common Base Event XML. The Common Base Event format is used by various IBM® products to communicate system management status. Any product that understands the Common Base Event XML format can use Common Base Event XML created by another product.
Within the WebSphere Sensor Events Java™ libraries, there are classes that convert an XML string to Common Base Event objects and convert Common Base Event objects to an XML string; however, using the available Common Base Event libraries would tie WebSphere Sensor Events to a specific Common Base Event version. Updating to a newer Common Base Event version would be almost as difficult as continuing to use a proprietary XML message format.
To insulate WebSphere Sensor Events from any changes to the Common Base Event format, the event data model was created. Upon entering WebSphere Sensor Events, a Common Base Event XML message is converted to Java objects of the event data model. These Java objects are then passed around within WebSphere Sensor Events. When WebSphere Sensor Events needs to communicate with external services, the Java objects are converted back to an XML string in the Common Base Event XML format. Therefore, if the Common Base Event format ever changes, the WebSphere Sensor Events does not change, only the conversion code changes.
The following concepts are used in the event model:
The implementation of the generic event model is made up of two main components:
Most classes follow the Java factory pattern. Each object instance is created not from a constructor but by calling a static getInstance method. The type returned from getInstance is not a class type but an interface type. When coding in the event model, code to the interface type and not the class type.
For more information on the event model, see the Example event format in the toolkit help and Managing event processing in the WebSphere Sensor Events Information Center.