org.rhq.modules.plugins.jbossas7
Class ManagedASComponent

java.lang.Object
  extended by org.rhq.modules.plugins.jbossas7.BaseComponent<HostControllerComponent<?>>
      extended by org.rhq.modules.plugins.jbossas7.ManagedASComponent
All Implemented Interfaces:
AvailabilityFacet, ConfigurationFacet, CreateChildResourceFacet, DeleteResourceFacet, ResourceComponent<HostControllerComponent<?>>, MeasurementFacet, OperationFacet, AS7Component<HostControllerComponent<?>>

public class ManagedASComponent
extends BaseComponent<HostControllerComponent<?>>

A component for a "Managed Server" Resource.

Author:
Heiko W. Rupp

Field Summary
 
Fields inherited from class org.rhq.modules.plugins.jbossas7.BaseComponent
MANAGED_SERVER, testConnection
 
Constructor Summary
ManagedASComponent()
           
 
Method Summary
 org.rhq.core.domain.measurement.AvailabilityType getAvailability()
          Get the availability of the managed AS server.
 void getValues(org.rhq.core.domain.measurement.MeasurementReport report, Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
          Gather measurement data
 OperationResult invokeOperation(String name, org.rhq.core.domain.configuration.Configuration parameters)
           
 org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
           
 void start(ResourceContext<HostControllerComponent<?>> hostControllerComponentResourceContext)
          Start the resource connection
 void stop()
           
 
Methods inherited from class org.rhq.modules.plugins.jbossas7.BaseComponent
createResource, deleteResource, deployContent, getAddress, getASConnection, getPath, getServerComponent, getStringValue, readAttribute, readAttribute, readAttribute, runDeploymentMagicOnServer, setConnection, setPath, updateResourceConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedASComponent

public ManagedASComponent()
Method Detail

start

public void start(ResourceContext<HostControllerComponent<?>> hostControllerComponentResourceContext)
           throws InvalidPluginConfigurationException,
                  Exception
Description copied from class: BaseComponent
Start the resource connection

Specified by:
start in interface ResourceComponent<HostControllerComponent<?>>
Overrides:
start in class BaseComponent<HostControllerComponent<?>>
Throws:
InvalidPluginConfigurationException
Exception
See Also:
ResourceComponent.start(org.rhq.core.pluginapi.inventory.ResourceContext)

stop

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

getAvailability

public org.rhq.core.domain.measurement.AvailabilityType getAvailability()
Get the availability of the managed AS server. We can't just check if a connection succeeds, as the check runs against the API/HostController and the managed server may still be down even if the connection succeeds.

Specified by:
getAvailability in interface AvailabilityFacet
Overrides:
getAvailability in class BaseComponent<HostControllerComponent<?>>
Returns:
Availability of the managed AS instance.
See Also:
AvailabilityFacet.getAvailability()

getValues

public void getValues(org.rhq.core.domain.measurement.MeasurementReport report,
                      Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
               throws Exception
Description copied from class: BaseComponent
Gather measurement data

Specified by:
getValues in interface MeasurementFacet
Overrides:
getValues in class BaseComponent<HostControllerComponent<?>>
Throws:
Exception
See Also:
MeasurementFacet.getValues(org.rhq.core.domain.measurement.MeasurementReport, java.util.Set)

loadResourceConfiguration

public org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
                                                                          throws Exception
Specified by:
loadResourceConfiguration in interface ConfigurationFacet
Overrides:
loadResourceConfiguration in class BaseComponent<HostControllerComponent<?>>
Throws:
Exception

invokeOperation

public OperationResult invokeOperation(String name,
                                       org.rhq.core.domain.configuration.Configuration parameters)
                                throws InterruptedException,
                                       Exception
Specified by:
invokeOperation in interface OperationFacet
Overrides:
invokeOperation in class BaseComponent<HostControllerComponent<?>>
Throws:
InterruptedException
Exception


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