org.rhq.plugins.postgres
Class PostgresDiscoveryComponent

java.lang.Object
  extended by org.rhq.plugins.postgres.PostgresDiscoveryComponent
All Implemented Interfaces:
ManualAddFacet, ResourceDiscoveryComponent

public class PostgresDiscoveryComponent
extends java.lang.Object
implements ResourceDiscoveryComponent, ManualAddFacet

Author:
Greg Hinkle, Ian Springer

Field Summary
static java.lang.String CONFIG_FILE_CONFIGURATION_PROPERTY
           
static java.lang.String CREDENTIALS_CONFIGURATION_PROPERTY
           
static java.lang.String DB_CONFIGURATION_PROPERTY
           
static java.lang.String DRIVER_CONFIGURATION_PROPERTY
           
static java.lang.String HOST_CONFIGURATION_PROPERTY
           
static java.lang.String PGDATA_DIR_CONFIGURATION_PROPERTY
           
static java.lang.String PORT_CONFIGURATION_PROPERTY
           
static java.lang.String PRINCIPAL_CONFIGURATION_PROPERTY
           
 
Constructor Summary
PostgresDiscoveryComponent()
           
 
Method Summary
static java.sql.Connection buildConnection(Configuration configuration)
           
protected static java.lang.String buildUrl(Configuration config)
           
protected static DiscoveredResourceDetails createResourceDetails(ResourceDiscoveryContext discoveryContext, Configuration pluginConfiguration, ProcessInfo processInfo)
           
 DiscoveredResourceDetails discoverResource(Configuration pluginConfig, ResourceDiscoveryContext discoveryContext)
           
 java.util.Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context)
           
protected static java.lang.String getDataDirPath(ProcessInfo procInfo)
           
protected static java.lang.String getVersion(Configuration config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PGDATA_DIR_CONFIGURATION_PROPERTY

public static final java.lang.String PGDATA_DIR_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

CONFIG_FILE_CONFIGURATION_PROPERTY

public static final java.lang.String CONFIG_FILE_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

DRIVER_CONFIGURATION_PROPERTY

public static final java.lang.String DRIVER_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

HOST_CONFIGURATION_PROPERTY

public static final java.lang.String HOST_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

PORT_CONFIGURATION_PROPERTY

public static final java.lang.String PORT_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

DB_CONFIGURATION_PROPERTY

public static final java.lang.String DB_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

PRINCIPAL_CONFIGURATION_PROPERTY

public static final java.lang.String PRINCIPAL_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

CREDENTIALS_CONFIGURATION_PROPERTY

public static final java.lang.String CREDENTIALS_CONFIGURATION_PROPERTY
See Also:
Constant Field Values
Constructor Detail

PostgresDiscoveryComponent

public PostgresDiscoveryComponent()
Method Detail

discoverResources

public java.util.Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context)
Specified by:
discoverResources in interface ResourceDiscoveryComponent

discoverResource

public DiscoveredResourceDetails discoverResource(Configuration pluginConfig,
                                                  ResourceDiscoveryContext discoveryContext)
                                           throws InvalidPluginConfigurationException
Specified by:
discoverResource in interface ManualAddFacet
Throws:
InvalidPluginConfigurationException

createResourceDetails

protected static DiscoveredResourceDetails createResourceDetails(ResourceDiscoveryContext discoveryContext,
                                                                 Configuration pluginConfiguration,
                                                                 @Nullable
                                                                 ProcessInfo processInfo)

buildUrl

protected static java.lang.String buildUrl(Configuration config)

getVersion

protected static java.lang.String getVersion(Configuration config)

buildConnection

public static java.sql.Connection buildConnection(Configuration configuration)
                                           throws java.sql.SQLException
Throws:
java.sql.SQLException

getDataDirPath

@Nullable
protected static java.lang.String getDataDirPath(@NotNull
                                                          ProcessInfo procInfo)


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