org.rhq.plugins.postgres
Class PostgresServerComponent<T extends ResourceComponent<?>>

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

public class PostgresServerComponent<T extends ResourceComponent<?>>
extends Object
implements DatabaseComponent<T>, ConfigurationFacet, MeasurementFacet, OperationFacet, CreateChildResourceFacet

Management for a PostgreSQL server

Author:
Greg Hinkle

Constructor Summary
PostgresServerComponent()
           
 
Method Summary
 CreateResourceReport createResource(CreateResourceReport report)
           
 void findProcessInfo()
           
 org.rhq.core.domain.measurement.AvailabilityType getAvailability()
           
protected  PostgresqlConfFile getConfigurationFile()
           
 Connection getConnection()
           
protected  String getJDBCUrl()
           
 double getObjectProperty(Object object, String name)
           
 void getValues(org.rhq.core.domain.measurement.MeasurementReport report, Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> metrics)
          Get data about the database server.
 OperationResult invokeOperation(String name, org.rhq.core.domain.configuration.Configuration parameters)
           
 org.rhq.core.domain.configuration.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<T extends ResourceComponent<?>>
Throws:
SQLException

stop

public void stop()
Specified by:
stop in interface ResourceComponent<T extends ResourceComponent<?>>

getJDBCUrl

protected String getJDBCUrl()

getAvailability

public org.rhq.core.domain.measurement.AvailabilityType getAvailability()
Specified by:
getAvailability in interface AvailabilityFacet

getConnection

public Connection getConnection()
Specified by:
getConnection in interface DatabaseComponent<T extends ResourceComponent<?>>

removeConnection

public void removeConnection()
Specified by:
removeConnection in interface DatabaseComponent<T extends ResourceComponent<?>>

getConfigurationFile

protected PostgresqlConfFile getConfigurationFile()
                                           throws IOException
Throws:
IOException

loadResourceConfiguration

public org.rhq.core.domain.configuration.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(org.rhq.core.domain.measurement.MeasurementReport report,
                      Set<org.rhq.core.domain.measurement.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,
                                       org.rhq.core.domain.configuration.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-2012 Red Hat, Inc.. All Rights Reserved.