org.rhq.plugins.postgres
Class PostgresServerComponent

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

public class PostgresServerComponent
extends java.lang.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()
           
 java.sql.Connection getConnection()
           
protected  java.lang.String getJDBCUrl()
           
 double getObjectProperty(java.lang.Object object, java.lang.String name)
           
 void getValues(MeasurementReport report, java.util.Set<MeasurementScheduleRequest> metrics)
          Get data about the database server.
 OperationResult invokeOperation(java.lang.String name, Configuration parameters)
           
 Configuration loadResourceConfiguration()
           
protected  java.lang.Object lookupAttributeProperty(java.lang.Object value, java.lang.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 java.sql.SQLException
Specified by:
start in interface ResourceComponent
Throws:
java.sql.SQLException

stop

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

getJDBCUrl

protected java.lang.String getJDBCUrl()

getAvailability

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

getConnection

public java.sql.Connection getConnection()
Specified by:
getConnection in interface DatabaseComponent

removeConnection

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

getConfigurationFile

protected PostgresqlConfFile getConfigurationFile()
                                           throws java.io.IOException
Throws:
java.io.IOException

loadResourceConfiguration

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

updateResourceConfiguration

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

getValues

public void getValues(MeasurementReport report,
                      java.util.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 java.lang.Object lookupAttributeProperty(java.lang.Object value,
                                                   java.lang.String property)

getObjectProperty

public double getObjectProperty(java.lang.Object object,
                                java.lang.String name)

invokeOperation

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

createResource

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

findProcessInfo

public void findProcessInfo()


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