public abstract class BaseServerComponent<T extends ResourceComponent<?>> extends BaseComponent<T> implements MeasurementFacet, BundleHandoverFacet
| Modifier and Type | Field and Description |
|---|---|
protected static long |
MAX_TIMEOUT_FAILURE_WAIT |
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) |
protected void |
collectEnvironmentTrait(org.rhq.core.domain.measurement.MeasurementReport report,
org.rhq.core.domain.measurement.MeasurementScheduleRequest request) |
protected String |
collectPatches() |
protected String |
findASDomainHostName() |
static String |
findASDomainHostName(ASConnection connection)
Reads local-host-name attribute
|
ASConnection |
getASConnection()
Returns the connection that can be used to send management requests to the managed AS& instance.
|
protected String |
getASHostName()
gets AS domain host name (defult is master for HC) null for standalone;
|
org.rhq.core.domain.measurement.AvailabilityType |
getAvailability()
Return availability of this resource
|
protected abstract String |
getBaseDirAttributeName() |
protected abstract String |
getConfigDirAttributeName() |
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() |
protected String |
getTempDirAttributeName()
Default implentation.
|
void |
getValues(org.rhq.core.domain.measurement.MeasurementReport report,
Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
Gather measurement data
|
protected BundleHandoverResponse |
handleExecuteScript(BundleHandoverRequest handoverRequest) |
protected OperationResult |
installManagementUser(org.rhq.core.domain.configuration.Configuration parameters,
org.rhq.core.domain.configuration.Configuration pluginConfig) |
boolean |
isManuallyAddedServer() |
protected void |
onAvailGoesUp()
this method get's called when availability was DOWN and now is UP.
|
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, getMetricValue, getPath, getResourceDescription, getServerAddress, getServerComponent, getSocketBindingGroup, getStringValue, includeOOBMessages, invokeOperation, loadResourceConfiguration, readAttribute, readAttribute, readAttribute, readAttribute, readAttribute, readAttribute, runDeploymentMagicOnServer, setPath, updateResourceConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleContentprotected static final long MAX_TIMEOUT_FAILURE_WAIT
public void start(ResourceContext<T> resourceContext) throws Exception
BaseComponentstart in interface ResourceComponent<T extends ResourceComponent<?>>start in class BaseComponent<T extends ResourceComponent<?>>ExceptionResourceComponent.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()protected void onAvailGoesUp()
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()
protected BundleHandoverResponse handleExecuteScript(BundleHandoverRequest handoverRequest) throws IOException
IOException@NotNull protected abstract Address getEnvironmentAddress()
@NotNull protected abstract Address getHostAddress()
@NotNull protected abstract String getBaseDirAttributeName()
@NotNull protected abstract String getConfigDirAttributeName()
protected String getTempDirAttributeName()
getEnvironmentAddress().protected void collectConfigTrait(org.rhq.core.domain.measurement.MeasurementReport report,
org.rhq.core.domain.measurement.MeasurementScheduleRequest request)
protected void collectEnvironmentTrait(org.rhq.core.domain.measurement.MeasurementReport report,
org.rhq.core.domain.measurement.MeasurementScheduleRequest request)
protected String getASHostName()
protected String findASDomainHostName()
findASDomainHostName(ASConnection)public static String findASDomainHostName(ASConnection connection)
protected String collectPatches()
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.