TPTP 4.4.0 Monitoring Tools Project
Public API Specification

org.eclipse.hyades.logging.adapter.formatters
Class CBEFormatter

java.lang.Object
  extended byorg.eclipse.hyades.logging.adapter.impl.Component
      extended byorg.eclipse.hyades.logging.adapter.impl.ProcessUnit
          extended byorg.eclipse.hyades.logging.adapter.formatters.CBEFormatter
All Implemented Interfaces:
ICBEPropertyConstants, IComponent, IFormatter, IProcessUnit

public class CBEFormatter
extends ProcessUnit
implements IFormatter, ICBEPropertyConstants

This Formatter class processes a List of IDirectedGraph objects to generate a CommonBaseEvent. An IDirectedGraph object maps a CommonBaseEvent property to its value. The CommonBaseEvent property name is represented by a path stored as a List. A path is used to represent the CommonBaseEvent property because CommonBaseEvent's have a class hierarchy. For example, the CommonBaseEvent has a Reporter Component ID and a Source Component ID property. Both of these are ComponentIdentification objects. So, for example, to represent the location property of the Source Component ID the IDirectedGraph path would be the list: COMMONBASEEVENT,COMMONBASEEVENT_SOURCECOMPONENTID,COMPONENTID_LOCATION where path nodes are separated by commas. Some CommonBaseEvent properties are arrays so they can be represented by an element of an array with an array index. For example contextDataElements is an array of ContextDataElements. To represent the name property of the second ContextDataElement in the array the IDirectedGraph path would be the list: COMMONBASEEVENT,COMMONBASEEVENT_CONTEXTDATAELEMENT,2,CONTEXTDATAELEMENT_NAME A special case is the children attribute of ExtendedDataElement. It is a collection of ExtendedDataElements which aren't ordered. Therefore, the name of the ExtendedDataElement will be used to represent the child ExtendedDataElement. For example, to represent the type property of the child ExtendedDataDlement with name "ErrorCode" in the third ExtendedDataElement in the CommonBaseEvent extendedDataElements array the IDirectedGraph path would be the list: COMMONBASEEVENT,COMMONBASEEVENT_EXTENDEDDATAELEMENT,3,EXTENDEDDATAELEMENT_CHILD,ErrorCode,EXTENDEDDATAELEMENT_TYPE


Field Summary
 
Fields inherited from class org.eclipse.hyades.logging.adapter.impl.ProcessUnit
flushingMode
 
Fields inherited from class org.eclipse.hyades.logging.adapter.impl.Component
logger, status, stopping
 
Fields inherited from interface org.eclipse.hyades.logging.adapter.ICBEPropertyConstants
ASSOCIATEDEVENT_ASSOCIATIONENGINEINFO, ASSOCIATEDEVENT_ASSOCIATIONENGINEREFERENCE, ASSOCIATEDEVENT_RESOLVEDEVENT, ASSOCIATIONENGINE_ID, ASSOCIATIONENGINE_NAME, ASSOCIATIONENGINE_TYPE, AVAILABLESITUATION, AVAILABLESITUATION_AVAILABILITYDISPOSITION, AVAILABLESITUATION_OPERATIONDISPOSITION, AVAILABLESITUATION_PROCESSINGDISPOSITION, COMMONBASEEVENT, COMMONBASEEVENT_ASSOCIATEDEVENTS, COMMONBASEEVENT_CONTEXTDATAELEMENTS, COMMONBASEEVENT_CREATIONTIME, COMMONBASEEVENT_ELAPSEDTIME, COMMONBASEEVENT_EXTENDEDDATAELEMENTS, COMMONBASEEVENT_EXTENSIONNAME, COMMONBASEEVENT_GLOBALINSTANCEID, COMMONBASEEVENT_LOCALINSTANCEID, COMMONBASEEVENT_MSG, COMMONBASEEVENT_MSGDATAELEMENT, COMMONBASEEVENT_OTHERDATA, COMMONBASEEVENT_PRIORITY, COMMONBASEEVENT_REPEATCOUNT, COMMONBASEEVENT_REPORTERCOMPONENTID, COMMONBASEEVENT_SEQUENCENUMBER, COMMONBASEEVENT_SEVERITY, COMMONBASEEVENT_SITUATION, COMMONBASEEVENT_SOURCECOMPONENTID, COMMONBASEEVENT_VERSION, COMPONENTID_APPLICATION, COMPONENTID_COMPONENT, COMPONENTID_COMPONENTIDTYPE, COMPONENTID_COMPONENTTYPE, COMPONENTID_EXECUTIONENVIRONMENT, COMPONENTID_INSTANCEID, COMPONENTID_LOCATION, COMPONENTID_LOCATIONTYPE, COMPONENTID_PROCESSID, COMPONENTID_SUBCOMPONENT, COMPONENTID_THREADID, CONFIGURESITUATION, CONNECTSITUATION, CONNECTSITUATION_SITUATIONDISPOSITION, CONTEXTDATAELEMENT_CONTEXTID, CONTEXTDATAELEMENT_CONTEXTVALUE, CONTEXTDATAELEMENT_NAME, CONTEXTDATAELEMENT_TYPE, CREATESITUATION, DEPENDENCYSITUATION, DEPENDENCYSITUATION_DEPENDENCYDISPOSITION, DESTROYSITUATION, EXTENDEDDATAELEMENT_CHILDREN, EXTENDEDDATAELEMENT_HEXVALUE, EXTENDEDDATAELEMENT_NAME, EXTENDEDDATAELEMENT_TYPE, EXTENDEDDATAELEMENT_VALUES, FEATURESITUATION, FEATURESITUATION_FEATUREDISPOSITION, MSGDATAELEMENT_MSGCATALOG, MSGDATAELEMENT_MSGCATALOGID, MSGDATAELEMENT_MSGCATALOGTOKENS, MSGDATAELEMENT_MSGCATALOGTYPE, MSGDATAELEMENT_MSGID, MSGDATAELEMENT_MSGIDTYPE, MSGDATAELEMENT_MSGLOCALE, OTHERSITUATION, OTHERSITUATION_ANYDATA, REPORTSITUATION, REPORTSITUATION_REPORTCATEGORY, REQUESTSITUATION, SITUATION_CATEGORYNAME, SITUATION_SITUATIONTYPE, SITUATIONTYPE_REASONINGSCOPE, SITUATIONTYPE_SITUATIONQUALIFIER, SITUATIONTYPE_SUCCESSDISPOSITION, STARTSITUATION, STOPSITUATION
 
Constructor Summary
CBEFormatter()
           
 
Method Summary
 java.lang.Object[] processEventItems(java.lang.Object[] msgs)
          Process messages by formatting them before returning them.
 java.lang.Object[] testProcessEventItems(java.lang.Object[] msgs)
          Simulate processing the array of List objects.
 void update()
          Perform any initialization based on the configuration.
 
Methods inherited from class org.eclipse.hyades.logging.adapter.impl.ProcessUnit
flushEventItems, getProperties, setProperties, updateConfigurationPropertyChild
 
Methods inherited from class org.eclipse.hyades.logging.adapter.impl.Component
clean, getComponents, getComponentStatus, getConfiguration, getContextConfiguration, getDescription, getEventFactory, getExecutableClassName, getImplementationCreationDate, getImplementationVersion, getImplementationVersionDescription, getItemsProcessedCount, getLogger, getLoggingLevel, getName, getParent, getRole, getRoleCreationDate, getRoleVersion, getRoleVersionDescription, getUniqueID, incrementItemsProcessedCount, incrementItemsProcessedCount, init, isDisabled, isStopping, log, log, setComponents, setConfiguration, setContextConfiguration, setDescription, setDisabled, setExecutableClassName, setImplemenationCreationDate, setImplementationVersion, setImplementationVersionDescription, setLogger, setLoggingLevel, setName, setParent, setRole, setRoleCreationDate, setRoleVersion, setRoleVersionDescription, setStopping, setUniqueID, start, stop, stop, trace, trace, trace, update, updateConfigurationAttribute, updateContextConfigurationAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.hyades.logging.adapter.IProcessUnit
flushEventItems
 
Methods inherited from interface org.eclipse.hyades.logging.adapter.IComponent
getComponents, getConfiguration, getContextConfiguration, getDescription, getExecutableClassName, getImplementationCreationDate, getImplementationVersion, getImplementationVersionDescription, getLogger, getLoggingLevel, getName, getParent, getRole, getRoleCreationDate, getRoleVersion, getRoleVersionDescription, getUniqueID, init, log, log, setComponents, setConfiguration, setContextConfiguration, setDescription, setExecutableClassName, setImplemenationCreationDate, setImplementationVersion, setImplementationVersionDescription, setLogger, setLoggingLevel, setName, setParent, setRole, setRoleCreationDate, setRoleVersion, setRoleVersionDescription, setUniqueID, start, stop, update
 

Constructor Detail

CBEFormatter

public CBEFormatter()
Method Detail

processEventItems

public java.lang.Object[] processEventItems(java.lang.Object[] msgs)
Process messages by formatting them before returning them. This implementation processes messages represented by an array of List objects where each List represents a message. The List is a list of IDirectedGraph objects representing the properties of the message.

Specified by:
processEventItems in interface IProcessUnit
Overrides:
processEventItems in class ProcessUnit
Parameters:
msgs - - an array of List objects representing messages
Returns:
the formatted messages as an array of CommonBaseEvent objects.
See Also:
IProcessUnit.processEventItems(java.lang.Object[])

testProcessEventItems

public java.lang.Object[] testProcessEventItems(java.lang.Object[] msgs)
                                         throws AdapterInvalidConfig
Simulate processing the array of List objects.

Specified by:
testProcessEventItems in interface IProcessUnit
Overrides:
testProcessEventItems in class ProcessUnit
Throws:
AdapterInvalidConfig
See Also:
IProcessUnit.testProcessEventItems(java.lang.Object[])

update

public void update()
            throws AdapterInvalidConfig
Perform any initialization based on the configuration.

Specified by:
update in interface IComponent
Overrides:
update in class ProcessUnit
Throws:
AdapterInvalidConfig
See Also:
IComponent.update()

TPTP 4.4.0 Monitoring Tools Project
Public API Specification