public abstract class BaseServerComponent<T extends ResourceComponent<?>> extends BaseComponent<T> implements MeasurementFacet
MANAGED_SERVER, testConnection| Constructor and Description |
|---|
BaseServerComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
collectConfigTrait(org.rhq.core.domain.measurement.MeasurementReport report,
org.rhq.core.domain.measurement.MeasurementScheduleRequest request) |
ASConnection |
getASConnection()
Returns the connection that can be used to send management requests to the managed AS& instance.
|
org.rhq.core.domain.measurement.AvailabilityType |
getAvailability()
Return availability of this resource
|
protected abstract String |
getBaseDirAttributeName() |
protected abstract Address |
getEnvironmentAddress() |
protected abstract Address |
getHostAddress() |
protected abstract AS7Mode |
getMode() |
String |
getReleaseVersion()
The release version as returned by the "release-version" attribute of the root node in the management model.
|
ServerPluginConfiguration |
getServerPluginConfiguration() |
StartScriptConfiguration |
getStartScriptConfiguration() |
void |
getValues(org.rhq.core.domain.measurement.MeasurementReport report,
Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
Gather measurement data
|
protected OperationResult |
installManagementUser(org.rhq.core.domain.configuration.Configuration parameters,
org.rhq.core.domain.configuration.Configuration pluginConfig) |
boolean |
isManuallyAddedServer() |
protected OperationResult |
postProcessResult(String name,
Result res)
Do some post processing of the Result - especially the 'shutdown' operation needs a special
treatment.
|
void |
requestDeferredChildResourcesDiscovery()
Requests a deferred child resource discovery for sub-resources of this server.
|
protected OperationResult |
restartServer(org.rhq.core.domain.configuration.Configuration parameters)
Restart the server by first executing a 'shutdown' operation via the management API and then calling
the
startServer() method to start it again. |
protected OperationResult |
runCliCommand(org.rhq.core.domain.configuration.Configuration parameters)
runs jboss-cli executable and returns its output
|
void |
setConnection(ASConnection connection) |
void |
start(ResourceContext<T> resourceContext)
Start the resource connection
|
protected OperationResult |
startServer()
Start the server by calling the start script defined in the plugin configuration.
|
void |
stop() |
protected boolean |
waitUntilDown() |
collectMulticastAddressTrait, createResource, deleteResource, deployContent, getAddress, getLog, getPath, getResourceDescription, getServerAddress, getServerComponent, getSocketBindingGroup, getStringValue, invokeOperation, loadResourceConfiguration, readAttribute, readAttribute, readAttribute, runDeploymentMagicOnServer, setPath, updateResourceConfigurationpublic void start(ResourceContext<T> resourceContext) throws InvalidPluginConfigurationException, Exception
BaseComponentstart in interface ResourceComponent<T extends ResourceComponent<?>>start in class BaseComponent<T extends ResourceComponent<?>>InvalidPluginConfigurationExceptionExceptionResourceComponent.start(org.rhq.core.pluginapi.inventory.ResourceContext)public void stop()
stop in interface ResourceComponent<T extends ResourceComponent<?>>stop in class BaseComponent<T extends ResourceComponent<?>>public org.rhq.core.domain.measurement.AvailabilityType getAvailability()
BaseComponentgetAvailability in interface AvailabilityFacetgetAvailability in class BaseComponent<T extends ResourceComponent<?>>AvailabilityFacet.getAvailability()public ServerPluginConfiguration getServerPluginConfiguration()
public StartScriptConfiguration getStartScriptConfiguration()
public ASConnection getASConnection()
AS7ComponentgetASConnection in interface AS7Component<T extends ResourceComponent<?>>getASConnection in class BaseComponent<T extends ResourceComponent<?>>public void setConnection(ASConnection connection)
setConnection in class BaseComponent<T extends ResourceComponent<?>>@NotNull protected abstract AS7Mode getMode()
protected OperationResult restartServer(org.rhq.core.domain.configuration.Configuration parameters) throws Exception
startServer() method to start it again.parameters - Parameters to pass to the (recursive) invocation of #invokeOperationException - If anything goes wrongprotected boolean waitUntilDown()
throws InterruptedException
InterruptedExceptionprotected OperationResult startServer() throws InterruptedException
InterruptedExceptionprotected OperationResult runCliCommand(org.rhq.core.domain.configuration.Configuration parameters) throws InterruptedException
parameters - input configuration (either commands or file sipmle-property is expected)InterruptedExceptionpublic boolean isManuallyAddedServer()
protected OperationResult postProcessResult(String name, Result res)
name - Name of the operationres - Result of the operation vs. AS7protected OperationResult installManagementUser(org.rhq.core.domain.configuration.Configuration parameters, org.rhq.core.domain.configuration.Configuration pluginConfig)
public void requestDeferredChildResourcesDiscovery()
public void getValues(org.rhq.core.domain.measurement.MeasurementReport report,
Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
throws Exception
BaseComponentgetValues in interface MeasurementFacetgetValues in class BaseComponent<T extends ResourceComponent<?>>ExceptionMeasurementFacet.getValues(org.rhq.core.domain.measurement.MeasurementReport, java.util.Set)public String getReleaseVersion()
@NotNull protected abstract Address getEnvironmentAddress()
@NotNull protected abstract Address getHostAddress()
@NotNull protected abstract String getBaseDirAttributeName()
protected void collectConfigTrait(org.rhq.core.domain.measurement.MeasurementReport report,
org.rhq.core.domain.measurement.MeasurementScheduleRequest request)
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.