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 Object
implements ResourceDiscoveryComponent, ManualAddFacet

Author:
Greg Hinkle, Ian Springer

Field Summary
static String CONFIG_FILE_CONFIGURATION_PROPERTY
           
static String CREDENTIALS_CONFIGURATION_PROPERTY
           
static String DB_CONFIGURATION_PROPERTY
           
static String DRIVER_CONFIGURATION_PROPERTY
           
static String HOST_CONFIGURATION_PROPERTY
           
static String PGDATA_DIR_CONFIGURATION_PROPERTY
           
static String PORT_CONFIGURATION_PROPERTY
           
static String PRINCIPAL_CONFIGURATION_PROPERTY
           
 
Constructor Summary
PostgresDiscoveryComponent()
           
 
Method Summary
static Connection buildConnection(org.rhq.core.domain.configuration.Configuration configuration, boolean logFailure)
           
protected static String buildUrl(org.rhq.core.domain.configuration.Configuration config)
           
protected static DiscoveredResourceDetails createResourceDetails(ResourceDiscoveryContext discoveryContext, org.rhq.core.domain.configuration.Configuration pluginConfiguration, ProcessInfo processInfo, boolean logConnectionFailure)
           
 DiscoveredResourceDetails discoverResource(org.rhq.core.domain.configuration.Configuration pluginConfig, ResourceDiscoveryContext discoveryContext)
           
 Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext context)
           
protected static String getDataDirPath(ProcessInfo procInfo)
           
protected static String getVersion(org.rhq.core.domain.configuration.Configuration config, ProcessInfo processInfo, SystemInfo systemInfo, Connection conn)
           
 
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 String PGDATA_DIR_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

CONFIG_FILE_CONFIGURATION_PROPERTY

public static final String CONFIG_FILE_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

DRIVER_CONFIGURATION_PROPERTY

public static final String DRIVER_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

HOST_CONFIGURATION_PROPERTY

public static final String HOST_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

PORT_CONFIGURATION_PROPERTY

public static final String PORT_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

DB_CONFIGURATION_PROPERTY

public static final String DB_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

PRINCIPAL_CONFIGURATION_PROPERTY

public static final String PRINCIPAL_CONFIGURATION_PROPERTY
See Also:
Constant Field Values

CREDENTIALS_CONFIGURATION_PROPERTY

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

PostgresDiscoveryComponent

public PostgresDiscoveryComponent()
Method Detail

discoverResources

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

discoverResource

public DiscoveredResourceDetails discoverResource(org.rhq.core.domain.configuration.Configuration pluginConfig,
                                                  ResourceDiscoveryContext discoveryContext)
                                           throws InvalidPluginConfigurationException
Specified by:
discoverResource in interface ManualAddFacet
Throws:
InvalidPluginConfigurationException

createResourceDetails

protected static DiscoveredResourceDetails createResourceDetails(ResourceDiscoveryContext discoveryContext,
                                                                 org.rhq.core.domain.configuration.Configuration pluginConfiguration,
                                                                 @Nullable
                                                                 ProcessInfo processInfo,
                                                                 boolean logConnectionFailure)

buildUrl

protected static String buildUrl(org.rhq.core.domain.configuration.Configuration config)

getVersion

protected static String getVersion(org.rhq.core.domain.configuration.Configuration config,
                                   ProcessInfo processInfo,
                                   SystemInfo systemInfo,
                                   Connection conn)

buildConnection

public static Connection buildConnection(org.rhq.core.domain.configuration.Configuration configuration,
                                         boolean logFailure)

getDataDirPath

@Nullable
protected static String getDataDirPath(@NotNull
                                                ProcessInfo procInfo)


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