org.rhq.plugins.database
Class CustomTableRowDiscoveryComponent

java.lang.Object
  extended by org.rhq.plugins.database.CustomTableRowDiscoveryComponent
All Implemented Interfaces:
ResourceDiscoveryComponent<DatabaseComponent<?>>

public class CustomTableRowDiscoveryComponent
extends Object
implements ResourceDiscoveryComponent<DatabaseComponent<?>>

Discovery for a generic component that can read data out of a table for monitoring purposes. Necessary configuration properties:

  • table - the name of the table to search for during inventory
  • keyColumn - the key of the table used to load metric data
  • name - the name of the resource
  • description - the description of the resource

    Author:
    Greg Hinkle

    Constructor Summary
    CustomTableRowDiscoveryComponent()
               
     
    Method Summary
     Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<DatabaseComponent<?>> resourceDiscoveryContext)
               
    static String formatMessage(String message, String key)
              Format a message with {} formatted replacement keys.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    CustomTableRowDiscoveryComponent

    public CustomTableRowDiscoveryComponent()
    Method Detail

    discoverResources

    public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<DatabaseComponent<?>> resourceDiscoveryContext)
                                                     throws InvalidPluginConfigurationException,
                                                            Exception
    Specified by:
    discoverResources in interface ResourceDiscoveryComponent<DatabaseComponent<?>>
    Throws:
    InvalidPluginConfigurationException
    Exception

    formatMessage

    public static String formatMessage(String message,
                                       String key)
    Format a message with {} formatted replacement keys.

    Parameters:
    message - the message to format
    key - to replace; if null returns the message as-is
    Returns:
    the formatted text with variables replaced


    Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.