org.rhq.plugins.postgres
Class PostgresUserComponent

java.lang.Object
  extended by org.rhq.plugins.postgres.PostgresUserComponent
All Implemented Interfaces:
AvailabilityFacet, ConfigurationFacet, DeleteResourceFacet, ResourceComponent<PostgresServerComponent<?>>, MeasurementFacet, DatabaseComponent<PostgresServerComponent<?>>

public class PostgresUserComponent
extends Object
implements DatabaseComponent<PostgresServerComponent<?>>, MeasurementFacet, ConfigurationFacet, DeleteResourceFacet

Author:
Greg Hinkle

Nested Class Summary
static class PostgresUserComponent.UpdateType
           
 
Constructor Summary
PostgresUserComponent()
           
 
Method Summary
 void deleteResource()
           
 org.rhq.core.domain.measurement.AvailabilityType getAvailability()
           
 Connection getConnection()
           
 String getUserName()
           
static String getUserSQL(org.rhq.core.domain.configuration.Configuration config, PostgresUserComponent.UpdateType type)
           
 void getValues(org.rhq.core.domain.measurement.MeasurementReport report, Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> metrics)
           
 org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
           
 void removeConnection()
           
 void start(ResourceContext<PostgresServerComponent<?>> resourceContext)
           
 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

PostgresUserComponent

public PostgresUserComponent()
Method Detail

start

public void start(ResourceContext<PostgresServerComponent<?>> resourceContext)
Specified by:
start in interface ResourceComponent<PostgresServerComponent<?>>

stop

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

getUserName

public String getUserName()

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<PostgresServerComponent<?>>

removeConnection

public void removeConnection()
Specified by:
removeConnection in interface DatabaseComponent<PostgresServerComponent<?>>

getValues

public void getValues(org.rhq.core.domain.measurement.MeasurementReport report,
                      Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> metrics)
               throws Exception
Specified by:
getValues in interface MeasurementFacet
Throws:
Exception

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

getUserSQL

public static String getUserSQL(org.rhq.core.domain.configuration.Configuration config,
                                PostgresUserComponent.UpdateType type)

deleteResource

public void deleteResource()
                    throws Exception
Specified by:
deleteResource in interface DeleteResourceFacet
Throws:
Exception


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