org.rhq.plugins.postgres
Class PostgresServerComponent

java.lang.Object
  extended by org.rhq.plugins.postgres.PostgresServerComponent
All Implemented Interfaces:
AvailabilityFacet, ConfigurationFacet, ConfigurationFacetSupport, CreateChildResourceFacet, ResourceComponent, MeasurementFacet, OperationFacet, DatabaseComponent

public class PostgresServerComponent
extends Object
implements DatabaseComponent, ConfigurationFacet, MeasurementFacet, OperationFacet, CreateChildResourceFacet

Management for a PostgreSQL server

Author:
Greg Hinkle

Constructor Summary
PostgresServerComponent()
           
 
Method Summary
 CreateResourceReport createResource(CreateResourceReport report)
           
 void findProcessInfo()
           
 AvailabilityType getAvailability()
           
protected  PostgresqlConfFile getConfigurationFile()
           
 Connection getConnection()
           
protected  String getJDBCUrl()
           
 double getObjectProperty(Object object, String name)
           
 void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics)
          Get data about the database server.
 OperationResult invokeOperation(String name, Configuration parameters)
           
 Configuration loadResourceConfiguration()
           
protected  Object lookupAttributeProperty(Object value, String property)
           
 void removeConnection()
           
 void start(ResourceContext context)
           
 void stop()
           
 void updateResourceConfiguration(ConfigurationUpdateReport report)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgresServerComponent

public PostgresServerComponent()
Method Detail

start

public void start(ResourceContext context)
           throws SQLException
Specified by:
start in interface ResourceComponent
Throws:
SQLException

stop

public void stop()
Specified by:
stop in interface ResourceComponent

getJDBCUrl

protected String getJDBCUrl()

getAvailability

public AvailabilityType getAvailability()
Specified by:
getAvailability in interface AvailabilityFacet

getConnection

public Connection getConnection()
Specified by:
getConnection in interface DatabaseComponent

removeConnection

public void removeConnection()
Specified by:
removeConnection in interface DatabaseComponent

getConfigurationFile

protected PostgresqlConfFile getConfigurationFile()
                                           throws IOException
Throws:
IOException

loadResourceConfiguration

public Configuration loadResourceConfiguration()
                                        throws Exception
Specified by:
loadResourceConfiguration in interface ConfigurationFacet
Throws:
Exception

updateResourceConfiguration

public void updateResourceConfiguration(ConfigurationUpdateReport report)
Specified by:
updateResourceConfiguration in interface ConfigurationFacet

getValues

public void getValues(MeasurementReport report,
                      Set<MeasurementScheduleRequest> metrics)
Get data about the database server. Currently we have two categories:

Specified by:
getValues in interface MeasurementFacet
Parameters:
report - the report where all collected measurement data will be added
metrics - the schedule of what needs to be collected when

lookupAttributeProperty

protected Object lookupAttributeProperty(Object value,
                                         String property)

getObjectProperty

public double getObjectProperty(Object object,
                                String name)

invokeOperation

public OperationResult invokeOperation(String name,
                                       Configuration parameters)
                                throws InterruptedException,
                                       Exception
Specified by:
invokeOperation in interface OperationFacet
Throws:
InterruptedException
Exception

createResource

public CreateResourceReport createResource(CreateResourceReport report)
Specified by:
createResource in interface CreateChildResourceFacet

findProcessInfo

public void findProcessInfo()


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