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
    Modifier
    Constructor
    Description
    protected
    DataUpdater(int pOrderId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.jolokia.json.JSONObject
    extractData(ObjectName pObjectName, MBeanInfo pMBeanInfo, String pFilter)
    Do the real work by extracting the data from the MBeanInfo.
    abstract String
    Get the key under which the extracted data should be added.
    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
    protected void
    Check whether the given path is empty, if not, then throw an exception

    Methods inherited from class org.jolokia.server.core.service.api.AbstractJolokiaService

    compareTo, destroy, getJolokiaContext, getOrder, getType, init, isEnabled, registerJolokiaMBean, unregisterJolokiaMBean

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Comparable

    compareTo

    Methods 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

      public abstract String 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 update
      pObjectName - ObjectName of the MBeanInfo to extract from
      pMBeanInfo - info to extract from
      pPathStack - 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 - ObjectName of the MBeanInfo to extract from
      pMBeanInfo - the info object to examine
      pFilter - any additional filter to apply
      Returns:
      the extracted data as an JSON object
    • verifyThatPathIsEmpty

      protected void verifyThatPathIsEmpty(Deque<String> pPathStack)
      Check whether the given path is empty, if not, then throw an exception
      Parameters:
      pPathStack - path to check