Class DataUpdater
java.lang.Object
org.jolokia.server.core.service.api.AbstractJolokiaService<DataUpdater>
org.jolokia.service.jmx.handler.list.DataUpdater
- All Implemented Interfaces:
Comparable<DataUpdater>,org.jolokia.server.core.service.api.JolokiaService<DataUpdater>
public abstract class DataUpdater
extends org.jolokia.server.core.service.api.AbstractJolokiaService<DataUpdater>
implements org.jolokia.server.core.service.api.JolokiaService<DataUpdater>
Interface for updating a
MBeanInfoData for a certain aspect of an MBeanInfo- Since:
- 13.09.11
- Author:
- roland
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jolokia.server.core.service.api.JolokiaService
org.jolokia.server.core.service.api.JolokiaService.Init -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.jolokia.json.JSONObjectextractData(ObjectName pObjectName, MBeanInfo pMBeanInfo, String pFilter) Do the real work by extracting the data from the MBeanInfo.abstract StringgetKey()Get the key under which the extracted data should be added.voidupdate(Map<String, Object> pMap, ObjectName pObjectName, MBeanInfo pMBeanInfo, Deque<String> pPathStack) Update the given map object with the data extracted from the given MBeanInfoprotected voidverifyThatPathIsEmpty(Deque<String> pPathStack) Check whether the given path is empty, if not, then throw an exceptionMethods inherited from class org.jolokia.server.core.service.api.AbstractJolokiaService
compareTo, destroy, getJolokiaContext, getOrder, getType, init, isEnabled, registerJolokiaMBean, unregisterJolokiaMBeanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.jolokia.server.core.service.api.JolokiaService
destroy, getOrder, getType, init, isEnabled
-
Constructor Details
-
DataUpdater
protected DataUpdater(int pOrderId)
-
-
Method Details
-
getKey
Get the key under which the extracted data should be added.- Returns:
- key
-
update
public void update(Map<String, Object> pMap, ObjectName pObjectName, MBeanInfo pMBeanInfo, Deque<String> pPathStack) Update the given map object with the data extracted from the given MBeanInfo- Parameters:
pMap- map to updatepObjectName-ObjectNameof theMBeanInfoto extract frompMBeanInfo- info to extract frompPathStack- stack for further constraining the result
-
extractData
public org.jolokia.json.JSONObject extractData(ObjectName pObjectName, MBeanInfo pMBeanInfo, String pFilter) Do the real work by extracting the data from the MBeanInfo. This method should be overridden, in its default implementation it returns an empty map- Parameters:
pObjectName-ObjectNameof theMBeanInfoto extract frompMBeanInfo- the info object to examinepFilter- any additional filter to apply- Returns:
- the extracted data as an JSON object
-
verifyThatPathIsEmpty
Check whether the given path is empty, if not, then throw an exception- Parameters:
pPathStack- path to check
-