org.rhq.plugins.jbossas5
Class ManagedComponentComponent

java.lang.Object
  extended by org.rhq.plugins.jbossas5.AbstractManagedComponent
      extended by org.rhq.plugins.jbossas5.ManagedComponentComponent
All Implemented Interfaces:
AvailabilityFacet, ConfigurationFacet, DeleteResourceFacet, ResourceComponent<ProfileServiceComponent<?>>, MeasurementFacet, OperationFacet, ProfileServiceComponent<ProfileServiceComponent<?>>, JMXComponent<ProfileServiceComponent<?>>
Direct Known Subclasses:
AbstractEjbBeanComponent, ConnectorComponent, DatasourceOrConnectionFactoryComponent, JBossMessagingComponent, JmsDestinationComponent, ManagerComponent, VirtualHostComponent, WebApplicationContextComponent

public class ManagedComponentComponent
extends AbstractManagedComponent
implements ConfigurationFacet, DeleteResourceFacet, OperationFacet, MeasurementFacet

Service ResourceComponent for all ManagedComponents in a Profile.

Author:
Ian Springer, Jason Dobies, Mark Spritzler

Nested Class Summary
static interface ManagedComponentComponent.Config
           
 
Field Summary
protected static char PREFIX_DELIMITER
           
 
Fields inherited from interface org.rhq.plugins.jmx.JMXComponent
CREDENTIALS_CONFIG_PROP, PRINCIPAL_CONFIG_PROP
 
Constructor Summary
ManagedComponentComponent()
           
 
Method Summary
protected  void addValueToMeasurementReport(org.rhq.core.domain.measurement.MeasurementReport report, org.rhq.core.domain.measurement.MeasurementScheduleRequest request, Object value)
           
 void deleteResource()
           
 org.rhq.core.domain.measurement.AvailabilityType getAvailability()
           
protected  String getComponentName()
           
protected  org.jboss.managed.api.ComponentType getComponentType()
           
protected static Object getInnerValue(org.jboss.metatype.api.values.MetaValue metaValue)
           
protected  org.jboss.managed.api.ManagedComponent getManagedComponent()
           
protected  org.jboss.managed.api.ManagedProperty getManagedProperty(org.jboss.managed.api.ManagedComponent managedComponent, org.rhq.core.domain.measurement.MeasurementScheduleRequest request)
          The name of the measurement schedule request (i.e.
protected  String getMeasurement(org.jboss.managed.api.ManagedComponent component, String metricName)
           
protected  Object getSimpleValue(org.jboss.managed.api.ManagedComponent managedComponent, org.rhq.core.domain.measurement.MeasurementScheduleRequest request)
          The name of the measurement schedule request (i.e.
protected  Object getSimpleValue(org.jboss.managed.api.ManagedComponent managedComponent, String metricName)
           
protected  void getValues(org.jboss.managed.api.ManagedComponent managedComponent, org.rhq.core.domain.measurement.MeasurementReport report, Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> metrics)
           
 void getValues(org.rhq.core.domain.measurement.MeasurementReport report, Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> metrics)
           
protected  OperationResult invokeOperation(org.jboss.managed.api.ManagedComponent managedComponent, String name, org.rhq.core.domain.configuration.Configuration parameters)
           
 OperationResult invokeOperation(String name, org.rhq.core.domain.configuration.Configuration parameters)
           
 org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
           
 void start(ResourceContext<ProfileServiceComponent<?>> resourceContext)
           
 void stop()
           
protected  void updateComponent(org.jboss.managed.api.ManagedComponent managedComponent)
           
 void updateResourceConfiguration(ConfigurationUpdateReport configurationUpdateReport)
           
 
Methods inherited from class org.rhq.plugins.jbossas5.AbstractManagedComponent
getConnection, getEmsConnection, getResourceContext, getResourceDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFIX_DELIMITER

protected static final char PREFIX_DELIMITER
See Also:
Constant Field Values
Constructor Detail

ManagedComponentComponent

public ManagedComponentComponent()
Method Detail

getAvailability

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

start

public void start(ResourceContext<ProfileServiceComponent<?>> resourceContext)
           throws Exception
Specified by:
start in interface ResourceComponent<ProfileServiceComponent<?>>
Overrides:
start in class AbstractManagedComponent
Throws:
Exception

stop

public void stop()
Specified by:
stop in interface ResourceComponent<ProfileServiceComponent<?>>
Overrides:
stop in class AbstractManagedComponent

loadResourceConfiguration

public org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
Specified by:
loadResourceConfiguration in interface ConfigurationFacet

updateResourceConfiguration

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

deleteResource

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

invokeOperation

public OperationResult invokeOperation(String name,
                                       org.rhq.core.domain.configuration.Configuration parameters)
                                throws Exception
Specified by:
invokeOperation in interface OperationFacet
Throws:
Exception

invokeOperation

protected OperationResult invokeOperation(org.jboss.managed.api.ManagedComponent managedComponent,
                                          String name,
                                          org.rhq.core.domain.configuration.Configuration parameters)
                                   throws Exception
Throws:
Exception

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

getValues

protected void getValues(org.jboss.managed.api.ManagedComponent managedComponent,
                         org.rhq.core.domain.measurement.MeasurementReport report,
                         Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> metrics)
                  throws Exception
Throws:
Exception

getMeasurement

protected String getMeasurement(org.jboss.managed.api.ManagedComponent component,
                                String metricName)
                         throws Exception
Throws:
Exception

updateComponent

protected void updateComponent(org.jboss.managed.api.ManagedComponent managedComponent)
                        throws Exception
Throws:
Exception

getSimpleValue

@Nullable
protected Object getSimpleValue(org.jboss.managed.api.ManagedComponent managedComponent,
                                         org.rhq.core.domain.measurement.MeasurementScheduleRequest request)
The name of the measurement schedule request (i.e. the metric name) can be in one of two forms:

[prefix'|']simplePropertyName (e.g. "maxTime" or "ThreadPool|currentThreadCount") [prefix'|']compositePropertyName'.'key (e.g. "consumerCount" or "messageStatistics.count")

Parameters:
managedComponent - a managed component
request - a measurement schedule request
Returns:
the metric value

getSimpleValue

@Nullable
protected Object getSimpleValue(org.jboss.managed.api.ManagedComponent managedComponent,
                                         String metricName)

getManagedProperty

@Nullable
protected org.jboss.managed.api.ManagedProperty getManagedProperty(org.jboss.managed.api.ManagedComponent managedComponent,
                                                                            org.rhq.core.domain.measurement.MeasurementScheduleRequest request)
The name of the measurement schedule request (i.e. the metric name) can be in one of two forms:

[prefix'|']simplePropertyName (e.g. "maxTime" or "ThreadPool|currentThreadCount") [prefix'|']compositePropertyName'.'key (e.g. "consumerCount" or "messageStatistics.count")

Parameters:
managedComponent - a managed component
request - a measurement schedule request
Returns:
the metric value

getInnerValue

@Nullable
protected static Object getInnerValue(org.jboss.metatype.api.values.MetaValue metaValue)

addValueToMeasurementReport

protected void addValueToMeasurementReport(org.rhq.core.domain.measurement.MeasurementReport report,
                                           org.rhq.core.domain.measurement.MeasurementScheduleRequest request,
                                           Object value)

getComponentType

protected org.jboss.managed.api.ComponentType getComponentType()

getComponentName

protected String getComponentName()

getManagedComponent

protected org.jboss.managed.api.ManagedComponent getManagedComponent()


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