Class ClassesDataImpl
java.lang.Object
javax.management.NotificationBroadcasterSupport
com.ibm.java.diagnostics.healthcenter.api.impl.HealthCenterDataImpl
com.ibm.java.diagnostics.healthcenter.api.classes.impl.ClassesDataImpl
- All Implemented Interfaces:
ClassesData,HealthCenterData,NotificationBroadcaster,NotificationEmitter
-
Field Summary
Fields inherited from class com.ibm.java.diagnostics.healthcenter.api.impl.HealthCenterDataImpl
DEFAULT_NOTIFICATION, UNSETFields inherited from interface com.ibm.java.diagnostics.healthcenter.api.classes.ClassesData
CLASSHISTOGRAMDATA, LOADEDCLASSESDATA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClassesListener(ClassesEventListener listener) Add a listener for notification of when a class load event occursvoidAdd a listener for notification of when a class histogram event occursGets the list of loaded classes.Gets the class histogram data.protected Stringprotected StringvoidremoveClassesListener(ClassesEventListener listener) Remove one of registered listeners.voidRemove one of registered listeners.voidStarts a thread which checks for changes in the data every 2000 milliseconds and sends notifications if an update has occurred.voidstartNotifying(long delay) Starts a thread which checks for changes in the data and sends notifications if an update has occurred.Methods inherited from class com.ibm.java.diagnostics.healthcenter.api.impl.HealthCenterDataImpl
convertSummaryToDouble, convertSummaryToInt, convertSummaryToLong, extractRate, findAllRecommendations, findRecommendations, getAllRecommendations, getCriticalRecommendations, getEventData, getHealthyRecommendations, getInformationalRecommendations, getJvmData, getMaxData, getMeanData, getMinData, getWarningRecommendations, setJvmData, stripPercentSymbolMethods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ibm.java.diagnostics.healthcenter.api.HealthCenterData
getAllRecommendations, getCriticalRecommendations, getHealthyRecommendations, getInformationalRecommendations, getWarningRecommendationsMethods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListenerMethods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
-
Constructor Details
-
ClassesDataImpl
public ClassesDataImpl(com.ibm.java.diagnostics.common.datamodel.data.Data data)
-
-
Method Details
-
getClassesLoaded
Description copied from interface:ClassesDataGets the list of loaded classes. NOTE If running in "event only" mode, this data will always return an empty array. This is because "event only" does not store any data to inquire on. Instead, you need to use the api calls to register listeners and get notification of when events occur- Specified by:
getClassesLoadedin interfaceClassesData- Returns:
- a ClassLoadData array of loaded classes.
-
getRecommendationLabel
- Specified by:
getRecommendationLabelin classHealthCenterDataImpl
-
getSubsystemLabel
- Specified by:
getSubsystemLabelin classHealthCenterDataImpl
-
getClassHistogram
Description copied from interface:ClassesDataGets the class histogram data.- Specified by:
getClassHistogramin interfaceClassesData- Returns:
- an array of ClassHistogramData objects.
-
startNotifying
public void startNotifying()Description copied from interface:HealthCenterDataStarts a thread which checks for changes in the data every 2000 milliseconds and sends notifications if an update has occurred. To handle these notifications, aNotificationListenerneeds to be added to the object the thread is being started from.- Specified by:
startNotifyingin interfaceHealthCenterData
-
startNotifying
public void startNotifying(long delay) Description copied from interface:HealthCenterDataStarts a thread which checks for changes in the data and sends notifications if an update has occurred. To handle these notifications, aNotificationListenerneeds to be added to the object the thread is being started from.- Specified by:
startNotifyingin interfaceHealthCenterData- Parameters:
delay- The number of milliseconds between each update. The default is 2000 milliseconds and anything below this will not be accepted.
-
addClassesListener
Description copied from interface:ClassesDataAdd a listener for notification of when a class load event occurs- Specified by:
addClassesListenerin interfaceClassesData
-
removeClassesListener
Description copied from interface:ClassesDataRemove one of registered listeners.- Specified by:
removeClassesListenerin interfaceClassesData
-
addClassHistogramListener
Description copied from interface:ClassesDataAdd a listener for notification of when a class histogram event occurs- Specified by:
addClassHistogramListenerin interfaceClassesData
-
removeClassHistogramListener
Description copied from interface:ClassesDataRemove one of registered listeners.- Specified by:
removeClassHistogramListenerin interfaceClassesData
-