An event source uses methods of the CommonBaseEvent to retrieve event property data.
When an event source receives an event, it can then use the getter methods of CommonBaseEvent to retrieve the event property data. For example, the following code fragment retrieves a single event and then reads the content of the msg property.
CommonBaseEvent event = eventAccess.queryEventByGlobalInstanceId(eventId); String eventMessage = event.getMsg();
If the property you want to retrieve is a complex property (a subelement of CommonBaseEvent in the Common Base Event specification), the returned value is an instance of the specialized class representing the complex data type. You can then use the getter methods of the returned object to retrieve the property data from that object. For example, the following code fragment retrieves the value of componentId, which is a complex property; it then retrieves the content of the nested component property, which is a string, to read the name of the source component.
CommonBaseEvent event = eventAccess.queryEventByGlobalInstanceId(eventId); ComponentIdentification componentId = event.getSourceComponentId(); String componentName = componentId.getComponent();