T - the type of the component's parent resource componentpublic class BaseComponent<T extends ResourceComponent<?>> extends Object implements AS7Component<T>, MeasurementFacet, ConfigurationFacet, DeleteResourceFacet, CreateChildResourceFacet, OperationFacet
| Modifier and Type | Field and Description |
|---|---|
static String |
MANAGED_SERVER |
protected ASConnection |
testConnection |
| Constructor and Description |
|---|
BaseComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
collectMulticastAddressTrait(org.rhq.core.domain.measurement.MeasurementReport report,
org.rhq.core.domain.measurement.MeasurementScheduleRequest request) |
CreateResourceReport |
createResource(CreateResourceReport report) |
void |
deleteResource() |
protected CreateResourceReport |
deployContent(CreateResourceReport report)
Deploy content to the remote server - this is one half of #createResource
|
Address |
getAddress() |
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
|
static org.apache.commons.logging.Log |
getLog()
Get the logger for AS7 plugin resource components.
|
String |
getPath()
Returns a path in the form (key=value)?(,key=value)* that can be used to construct an address to this component's
underlying managed service.
|
protected String |
getResourceDescription() |
protected Address |
getServerAddress() |
BaseServerComponent |
getServerComponent() |
protected String |
getSocketBindingGroup() |
protected String |
getStringValue(Object val) |
void |
getValues(org.rhq.core.domain.measurement.MeasurementReport report,
Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> metrics)
Gather measurement data
|
OperationResult |
invokeOperation(String name,
org.rhq.core.domain.configuration.Configuration parameters) |
org.rhq.core.domain.configuration.Configuration |
loadResourceConfiguration() |
protected String |
readAttribute(Address address,
String name) |
protected <T> T |
readAttribute(Address address,
String name,
Class<T> resultType) |
protected String |
readAttribute(String name) |
CreateResourceReport |
runDeploymentMagicOnServer(CreateResourceReport report,
String runtimeName,
String deploymentName,
String hash)
Do the actual fumbling with the domain api to deploy the uploaded content
|
void |
setConnection(ASConnection connection) |
void |
setPath(String path) |
void |
start(ResourceContext<T> context)
Start the resource connection
|
void |
stop() |
void |
updateResourceConfiguration(ConfigurationUpdateReport report) |
public static final String MANAGED_SERVER
protected ASConnection testConnection
public void start(ResourceContext<T> context) throws InvalidPluginConfigurationException, Exception
start in interface ResourceComponent<T extends ResourceComponent<?>>InvalidPluginConfigurationExceptionExceptionResourceComponent.start(org.rhq.core.pluginapi.inventory.ResourceContext)public void stop()
stop in interface ResourceComponent<T extends ResourceComponent<?>>public org.rhq.core.domain.measurement.AvailabilityType getAvailability()
getAvailability in interface AvailabilityFacetAvailabilityFacet.getAvailability()protected String getResourceDescription()
public BaseServerComponent getServerComponent()
public void getValues(org.rhq.core.domain.measurement.MeasurementReport report,
Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> metrics)
throws Exception
getValues in interface MeasurementFacetExceptionMeasurementFacet.getValues(org.rhq.core.domain.measurement.MeasurementReport, java.util.Set)public ASConnection getASConnection()
AS7ComponentgetASConnection in interface AS7Component<T extends ResourceComponent<?>>public String getPath()
AS7ComponentgetPath in interface AS7Component<T extends ResourceComponent<?>>public org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
throws Exception
loadResourceConfiguration in interface ConfigurationFacetExceptionpublic void updateResourceConfiguration(ConfigurationUpdateReport report)
updateResourceConfiguration in interface ConfigurationFacetpublic void deleteResource()
throws Exception
deleteResource in interface DeleteResourceFacetExceptionpublic CreateResourceReport createResource(CreateResourceReport report)
createResource in interface CreateChildResourceFacetprotected CreateResourceReport deployContent(CreateResourceReport report)
report - Create resource report that tells us what to dopublic CreateResourceReport runDeploymentMagicOnServer(CreateResourceReport report, String runtimeName, String deploymentName, String hash)
report - CreateResourceReport to report the resultruntimeName - File name to use as runtime namedeploymentName - Name of the deploymenthash - Hash of the content bytespublic OperationResult invokeOperation(String name, org.rhq.core.domain.configuration.Configuration parameters) throws InterruptedException, Exception
invokeOperation in interface OperationFacetInterruptedExceptionExceptionpublic void setConnection(ASConnection connection)
public void setPath(String path)
public Address getAddress()
protected String readAttribute(Address address, String name) throws Exception
Exceptionprotected <T> T readAttribute(Address address, String name, Class<T> resultType) throws Exception
Exceptionprotected Address getServerAddress()
protected String getSocketBindingGroup()
protected void collectMulticastAddressTrait(org.rhq.core.domain.measurement.MeasurementReport report,
org.rhq.core.domain.measurement.MeasurementScheduleRequest request)
public static org.apache.commons.logging.Log getLog()
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.