org.teiid.rhq.plugin
Class PlatformComponent

java.lang.Object
  extended by org.teiid.rhq.plugin.Facet
      extended by org.teiid.rhq.plugin.PlatformComponent
All Implemented Interfaces:
org.rhq.core.pluginapi.availability.AvailabilityFacet, org.rhq.core.pluginapi.configuration.ConfigurationFacet, org.rhq.core.pluginapi.content.ContentFacet, org.rhq.core.pluginapi.inventory.CreateChildResourceFacet, org.rhq.core.pluginapi.inventory.DeleteResourceFacet, org.rhq.core.pluginapi.inventory.ResourceComponent<org.rhq.core.pluginapi.inventory.ResourceComponent>, org.rhq.core.pluginapi.measurement.MeasurementFacet, org.rhq.core.pluginapi.operation.OperationFacet, org.rhq.plugins.jbossas5.ProfileServiceComponent<org.rhq.core.pluginapi.inventory.ResourceComponent>, org.rhq.plugins.jmx.JMXComponent<org.rhq.core.pluginapi.inventory.ResourceComponent>

public class PlatformComponent
extends Facet


Field Summary
 
Fields inherited from class org.teiid.rhq.plugin.Facet
componentType, deploymentName, deploymentUrl, isAvailable, name, resourceConfiguration, resourceContext
 
Fields inherited from interface org.rhq.plugins.jmx.JMXComponent
CREDENTIALS_CONFIG_PROP, PRINCIPAL_CONFIG_PROP
 
Constructor Summary
PlatformComponent()
           
 
Method Summary
 org.rhq.core.domain.measurement.AvailabilityType getAvailability()
           
 org.rhq.plugins.jbossas5.connection.ProfileServiceConnection getConnection()
           
 org.mc4j.ems.connection.EmsConnection getEmsConnection()
           
 void getValues(org.rhq.core.domain.measurement.MeasurementReport report, java.util.Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
          The plugin container will call this method when your resource component has been scheduled to collect some measurements now.
 org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
          The plugin container will call this method and it needs to obtain the current configuration of the managed resource.
protected  void setOperationArguments(java.lang.String name, org.rhq.core.domain.configuration.Configuration configuration, java.util.Map<java.lang.String,java.lang.Object> valueMap)
           
 void start(org.rhq.core.pluginapi.inventory.ResourceContext context)
          This is called when your component has been started with the given context.
 void stop()
          This is called when the component is being stopped, usually due to the plugin container shutting down.
 void updateResourceConfiguration(org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport report)
          The plugin container will call this method when it has a new configuration for your managed resource.
 
Methods inherited from class org.teiid.rhq.plugin.Facet
componentType, createContentBasedResource, createResource, deleteResource, deployPackages, discoverDeployedPackages, execute, generateInstallationSteps, getComponentIdentifier, getDefaultPluginConfiguration, getManagedProperties, getResourceConfiguration, invokeOperation, isAvailable, removePackages, retrievePackageBits, setComponentIdentifier, setComponentName, setMetricArguments, setResourceConfiguration, updateComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformComponent

public PlatformComponent()
Method Detail

start

public void start(org.rhq.core.pluginapi.inventory.ResourceContext context)
Description copied from class: Facet
This is called when your component has been started with the given context. You normally initialize some internal state of your component as well as attempt to make a stateful connection to your managed resource.

Specified by:
start in interface org.rhq.core.pluginapi.inventory.ResourceComponent<org.rhq.core.pluginapi.inventory.ResourceComponent>
Overrides:
start in class Facet
See Also:
ResourceComponent.start(ResourceContext)

getAvailability

public org.rhq.core.domain.measurement.AvailabilityType getAvailability()
Specified by:
getAvailability in interface org.rhq.core.pluginapi.availability.AvailabilityFacet
Overrides:
getAvailability in class Facet

setOperationArguments

protected void setOperationArguments(java.lang.String name,
                                     org.rhq.core.domain.configuration.Configuration configuration,
                                     java.util.Map<java.lang.String,java.lang.Object> valueMap)
Overrides:
setOperationArguments in class Facet

getValues

public void getValues(org.rhq.core.domain.measurement.MeasurementReport report,
                      java.util.Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
               throws java.lang.Exception
Description copied from class: Facet
The plugin container will call this method when your resource component has been scheduled to collect some measurements now. It is within this method that you actually talk to the managed resource and collect the measurement data that is has emitted.

Specified by:
getValues in interface org.rhq.core.pluginapi.measurement.MeasurementFacet
Specified by:
getValues in class Facet
Throws:
java.lang.Exception
See Also:
MeasurementFacet.getValues(MeasurementReport, Set)

stop

public void stop()
Description copied from class: Facet
This is called when the component is being stopped, usually due to the plugin container shutting down. You can perform some cleanup here; though normally not much needs to be done here.

Specified by:
stop in interface org.rhq.core.pluginapi.inventory.ResourceComponent<org.rhq.core.pluginapi.inventory.ResourceComponent>
Overrides:
stop in class Facet
See Also:
ResourceComponent.stop()

updateResourceConfiguration

public void updateResourceConfiguration(org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport report)
Description copied from class: Facet
The plugin container will call this method when it has a new configuration for your managed resource. Your plugin will re-configure the managed resource in your own custom way, setting its configuration based on the new values of the given configuration.

Specified by:
updateResourceConfiguration in interface org.rhq.core.pluginapi.configuration.ConfigurationFacet
Overrides:
updateResourceConfiguration in class Facet
See Also:
ConfigurationFacet.updateResourceConfiguration(ConfigurationUpdateReport)

loadResourceConfiguration

public org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
Description copied from class: Facet
The plugin container will call this method and it needs to obtain the current configuration of the managed resource. Your plugin will obtain the managed resource's configuration in your own custom way and populate the returned Configuration object with the managed resource's configuration property values.

Specified by:
loadResourceConfiguration in interface org.rhq.core.pluginapi.configuration.ConfigurationFacet
Overrides:
loadResourceConfiguration in class Facet
See Also:
ConfigurationFacet.loadResourceConfiguration()

getConnection

public org.rhq.plugins.jbossas5.connection.ProfileServiceConnection getConnection()

getEmsConnection

public org.mc4j.ems.connection.EmsConnection getEmsConnection()


Copyright © 2011. All Rights Reserved.