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 java.lang.Object
implements ResourceDiscoveryComponent<DatabaseComponent>

Discovery for a generic component that can read data out of a table for monitoring purposes. Neccessary configuration properties table - the name of the table to search for during inventory metricQuery - the query run to load metric data name - the name of the resource description - the description of the resource

Author:
Greg Hinkle

Constructor Summary
CustomTableRowDiscoveryComponent()
           
 
Method Summary
 java.util.Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<DatabaseComponent> resourceDiscoveryContext)
           
static java.lang.String formatMessage(java.lang.String message, java.lang.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 java.util.Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<DatabaseComponent> resourceDiscoveryContext)
                                                           throws InvalidPluginConfigurationException,
                                                                  java.lang.Exception
Specified by:
discoverResources in interface ResourceDiscoveryComponent<DatabaseComponent>
Throws:
InvalidPluginConfigurationException
java.lang.Exception

formatMessage

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

Parameters:
message - the message to format
Returns:
the formatted text with variables replaced


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