org.rhq.modules.plugins.jbossas7
Class BaseServerComponent

java.lang.Object
  extended by org.rhq.modules.plugins.jbossas7.BaseComponent
      extended by org.rhq.modules.plugins.jbossas7.BaseServerComponent
All Implemented Interfaces:
AvailabilityFacet, ConfigurationFacet, CreateChildResourceFacet, DeleteResourceFacet, ResourceComponent, MeasurementFacet, OperationFacet
Direct Known Subclasses:
HostControllerComponent, StandaloneASComponent

public class BaseServerComponent
extends BaseComponent
implements MeasurementFacet

Base component for functionality that is common to Standalone AS and HostControllers

Author:
Heiko W. Rupp

Constructor Summary
BaseServerComponent()
           
 
Method Summary
 void getValues(org.rhq.core.domain.measurement.MeasurementReport report, Set metrics)
          Gather measurement data
protected  OperationResult installManagementUser(org.rhq.core.domain.configuration.Configuration parameters, org.rhq.core.domain.configuration.Configuration pluginConfig, AS7Mode mode)
           
protected  OperationResult postProcessResult(String name, Result res)
          Do some post processing of the Result - especially the 'shutdown' operation needs a special treatment.
protected  OperationResult restartServer(org.rhq.core.domain.configuration.Configuration parameters, AS7Mode mode)
          Restart the server by first executing a 'shutdown' operation via its API.
protected  OperationResult startServer(AS7Mode mode)
          Start the server by calling the start script listed in the plugin configuration.
 
Methods inherited from class org.rhq.modules.plugins.jbossas7.BaseComponent
createResource, deleteResource, deployContent, getAddress, getASConnection, getAvailability, getPath, invokeOperation, loadResourceConfiguration, runDeploymentMagicOnServer, setConnection, setPath, start, stop, updateResourceConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseServerComponent

public BaseServerComponent()
Method Detail

restartServer

protected OperationResult restartServer(org.rhq.core.domain.configuration.Configuration parameters,
                                        AS7Mode mode)
                                 throws Exception
Restart the server by first executing a 'shutdown' operation via its API. Then call the #startServer method to start it again.

Parameters:
parameters - Parameters to pass to the (recursive) invocation of #invokeOperation
mode -
Returns:
State of execution
Throws:
Exception - If anything goes wrong

startServer

protected OperationResult startServer(AS7Mode mode)
Start the server by calling the start script listed in the plugin configuration. If a different config is given, this is passed via --server-config

Parameters:
mode -
Returns:
State of Execution.

postProcessResult

protected OperationResult postProcessResult(String name,
                                            Result res)
Do some post processing of the Result - especially the 'shutdown' operation needs a special treatment.

Parameters:
name - Name of the operation
res - Result of the operation vs. AS7
Returns:
OperationResult filled in from values of res

installManagementUser

protected OperationResult installManagementUser(org.rhq.core.domain.configuration.Configuration parameters,
                                                org.rhq.core.domain.configuration.Configuration pluginConfig,
                                                AS7Mode mode)

getValues

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

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


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