com.ibm.wsspi.rasdiag

Class DiagnosticEventFactory

  1. java.lang.Object
  2. extended bycom.ibm.wsspi.rasdiag.DiagnosticEventFactory

  1. public class DiagnosticEventFactory
  2. extends java.lang.Object
The DiagnosticFactory class provides a simple means for DiagnosticProviders in the DiagnosticProvider infrastructure to create DiagnosticEvents with artifacts that they have created. There are 3 signatures for the same function similar to the logging signatures. All have a hashMap payload, one has no message parms, one has one message parm, and the third has an object array of message parms. The HashMap contains AttributeIds as the name and DiagnosticTypedValue objects (including MessageKeys) as the value or ... sub-HashMap names as the name and a child HashMap as the value

Constructor Summary

Constructor and Description
DiagnosticEventFactory()

Method Summary

Modifier and Type Method and Description
  1. static
  2. DiagnosticEvent
createConfigDump(java.lang.String aDPId,java.lang.String sourceClass,java.lang.String sourceMethod,java.util.HashMap aDiagnosticEventData)
creates a dump of the configuration for a DiagnosticProvider
  1. static
  2. DiagnosticEvent
createDiagnosticEvent(java.lang.String aDPId,java.lang.String aEventType,int level,java.lang.String sourceClass,java.lang.String sourceMethod,java.lang.String aResourceBundleName,java.lang.String aMsgKey,java.util.HashMap aDiagnosticEventData)
creates a DiagnosticEvent.
  1. static
  2. DiagnosticEvent
createDiagnosticEvent(java.lang.String aDPId,java.lang.String aEventType,int level,java.lang.String sourceClass,java.lang.String sourceMethod,java.lang.String aResourceBundleName,java.lang.String aMsgKey,java.lang.Object[] aMsgParams,java.util.HashMap aDiagnosticEventData)
creates a DiagnosticEvent.
  1. static
  2. DiagnosticEvent
createDiagnosticEvent(java.lang.String aDPId,java.lang.String aEventType,int level,java.lang.String sourceClass,java.lang.String sourceMethod,java.lang.String aResourceBundleName,java.lang.String aMsgKey,java.lang.Object aMsgParams,java.util.HashMap aDiagnosticEventData)
creates a DiagnosticEvent.
  1. static
  2. DiagnosticEvent
createStateDump(java.lang.String aDPId,java.lang.String sourceClass,java.lang.String sourceMethod,java.util.HashMap aDiagnosticEventData)
creates a dump of the current state of a DiagnosticProvider
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DiagnosticEventFactory

  1. public DiagnosticEventFactory()

Method Detail

createConfigDump

  1. public static DiagnosticEvent createConfigDump( java.lang.String aDPId,
  2. java.lang.String sourceClass,
  3. java.lang.String sourceMethod,
  4. java.util.HashMap aDiagnosticEventData)
creates a dump of the configuration for a DiagnosticProvider
Parameters:
aDPId - DiagnosticProvider ID of the caller (a DiagnosticProvider). This is currently the JMX objectName
sourceClass - Class that initiated construction of the DiagnosticEvent
sourceMethod - Method that initiated construction of the DiagnosticEvent
aDiagnosticEventData - HashMap containing the primary data in the Payload. The DiagnosticTypedValue class provides the ability to create typed values, and provides a helper method (addHashMap) for cascading HashMaps within HashMaps (recursively if needed).
Returns:
a DiagnosticEvent which contains the payload passed in along with various methods to retrieve it.

createStateDump

  1. public static DiagnosticEvent createStateDump( java.lang.String aDPId,
  2. java.lang.String sourceClass,
  3. java.lang.String sourceMethod,
  4. java.util.HashMap aDiagnosticEventData)
creates a dump of the current state of a DiagnosticProvider
Parameters:
aDPId - DiagnosticProvider ID of the caller (a DiagnosticProvider). This is currently the JMX objectName
sourceClass - Class that initiated construction of the DiagnosticEvent
sourceMethod - Method that initiated construction of the DiagnosticEvent
aDiagnosticEventData - HashMap containing the primary data in the Payload. The DiagnosticTypedValue class provides the ability to create typed values, and provides a helper method (addHashMap) for cascading HashMaps within HashMaps (recursively if needed).
Returns:
a DiagnosticEvent which contains the payload passed in along with various methods to retrieve it.

createDiagnosticEvent

  1. public static DiagnosticEvent createDiagnosticEvent( java.lang.String aDPId,
  2. java.lang.String aEventType,
  3. int level,
  4. java.lang.String sourceClass,
  5. java.lang.String sourceMethod,
  6. java.lang.String aResourceBundleName,
  7. java.lang.String aMsgKey,
  8. java.util.HashMap aDiagnosticEventData)
creates a DiagnosticEvent. Primarily used at this time when DiagnosticProviders are requested to run selfDiagnostic tests
Parameters:
aDPId - DiagnosticProvider ID of the caller (a DiagnosticProvider). This is currently the JMX objectName
aEventType - String that will go into the DiagnosticEvent to identify what prompted the creation of this Event
level - The severity level of the DiagnosticEvent. Currently supported levels:
  • DiagnosticEvent.LEVEL_INFO (10)
  • DiagnosticEvent.LEVEL_WARNING (30)
  • DiagnosticEvent.LEVEL_SEVERE (50)
sourceClass - Class that initiated construction of the DiagnosticEvent
sourceMethod - Method that initiated construction of the DiagnosticEvent
aResourceBundleName - Name of the ResourceBundle used for localization
aMsgKey - Key for the message within the ResourceBundle
aDiagnosticEventData - HashMap containing the primary data in the Payload. The DiagnosticTypedValue class provides the ability to create typed values, and provides a helper method (addHashMap) for cascading HashMaps within HashMaps (recursively if needed).
Returns:
a DiagnosticEvent which contains the payload passed in along with various methods to retrieve it.

createDiagnosticEvent

  1. public static DiagnosticEvent createDiagnosticEvent( java.lang.String aDPId,
  2. java.lang.String aEventType,
  3. int level,
  4. java.lang.String sourceClass,
  5. java.lang.String sourceMethod,
  6. java.lang.String aResourceBundleName,
  7. java.lang.String aMsgKey,
  8. java.lang.Object aMsgParams,
  9. java.util.HashMap aDiagnosticEventData)
creates a DiagnosticEvent. Primarily used at this time when DiagnosticProviders are requested to run selfDiagnostic tests
Parameters:
aDPId - DiagnosticProvider ID of the caller (a DiagnosticProvider). This is currently the JMX objectName
aEventType - String that will go into the DiagnosticEvent to identify what prompted the creation of this Event
level - The severity level of the DiagnosticEvent. Currently supported levels:
  • DiagnosticEvent.LEVEL_INFO (0)
  • DiagnosticEvent.LEVEL_WARNING (10)
  • DiagnosticEvent.LEVEL_SEVERE (20)
sourceClass - Class that initiated construction of the DiagnosticEvent
sourceMethod - Method that initiated construction of the DiagnosticEvent
aResourceBundleName - Name of the ResourceBundle used for localization
aMsgKey - Key for the message within the ResourceBundle
aMsgParams - Single parameter to the message for processing
aDiagnosticEventData - HashMap containing the primary data in the Payload. The DiagnosticTypedValue class provides the ability to create typed values, and provides a helper method (addHashMap) for cascading HashMaps within HashMaps (recursively if needed).
Returns:
a DiagnosticEvent which contains the payload passed in along with various methods to retrieve it.

createDiagnosticEvent

  1. public static DiagnosticEvent createDiagnosticEvent( java.lang.String aDPId,
  2. java.lang.String aEventType,
  3. int level,
  4. java.lang.String sourceClass,
  5. java.lang.String sourceMethod,
  6. java.lang.String aResourceBundleName,
  7. java.lang.String aMsgKey,
  8. java.lang.Object[] aMsgParams,
  9. java.util.HashMap aDiagnosticEventData)
creates a DiagnosticEvent. Primarily used at this time when DiagnosticProviders are requested to run selfDiagnostic tests
Parameters:
aDPId - DiagnosticProvider ID of the caller (a DiagnosticProvider). This is currently the JMX objectName
aEventType - String that will go into the DiagnosticEvent to identify what prompted the creation of this Event
level - The severity level of the DiagnosticEvent. Currently supported levels:
  • DiagnosticEvent.LEVEL_INFO (10)
  • DiagnosticEvent.LEVEL_WARNING (30)
  • DiagnosticEvent.LEVEL_SEVERE (50)
sourceClass - Class that initiated construction of the DiagnosticEvent
sourceMethod - Method that initiated construction of the DiagnosticEvent
aResourceBundleName - Name of the ResourceBundle used for localization
aMsgKey - Key for the message within the ResourceBundle
aMsgParams - Array of parameters to the message for processing
aDiagnosticEventData - HashMap containing the primary data in the Payload. The DiagnosticTypedValue class provides the ability to create typed values, and provides a helper method (addHashMap) for cascading HashMaps within HashMaps (recursively if needed).
Returns:
a DiagnosticEvent which contains the payload passed in along with various methods to retrieve it.