public class BytemanAgentComponent extends Object implements ResourceComponent<BytemanAgentComponent>, MeasurementFacet, OperationFacet, ContentFacet, CreateChildResourceFacet, ConfigurationFacet
| Constructor and Description |
|---|
BytemanAgentComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDeployedClasspathJars()
Goes through all jars that were deployed via RHQ and ensures they are still deployed, adding
them if need be.
|
CreateResourceReport |
createResource(CreateResourceReport report)
Creates a new script by deploying the script file to the Byteman agent.
|
org.rhq.core.domain.content.transfer.DeployPackagesResponse |
deployPackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages,
ContentServices contentServices)
Deploys boot and system classpath jars to the Byteman agent.
|
Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> |
discoverDeployedPackages(org.rhq.core.domain.content.PackageType type)
Detects the different content for the Byteman agent.
|
List<org.rhq.core.domain.content.transfer.DeployPackageStep> |
generateInstallationSteps(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
Essentially a no-op - there are no installation steps associated with Byteman content.
|
Map<String,String> |
getAllKnownScripts()
Returns a cached copy of all known scripts since the last availability check was made.
|
org.rhq.core.domain.measurement.AvailabilityType |
getAvailability()
Determines if the Byteman agent is up by asking it for the current list of all scripts and their rules.
|
File |
getBootJarsDataDirectory() |
org.jboss.byteman.agent.submit.Submit |
getBytemanClient()
Returns a client that can be used to talk to the remote Byteman agent.
|
File |
getPackageFile(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
Given a package details, this will attempt to find that package's file.
|
File |
getResourceDataDirectory(String suffix)
Returns the component's data directory that is used to persist managed content.
|
File |
getScriptsDataDirectory() |
File |
getSystemJarsDataDirectory() |
void |
getValues(org.rhq.core.domain.measurement.MeasurementReport report,
Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
The plugin container will call this method when metrics are to be collected.
|
OperationResult |
invokeOperation(String name,
org.rhq.core.domain.configuration.Configuration configuration)
The plugin container will call this method when it wants to invoke an operation on
the Byteman agent.
|
org.rhq.core.domain.configuration.Configuration |
loadResourceConfiguration() |
org.rhq.core.domain.content.transfer.RemovePackagesResponse |
removePackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages)
Removes the packages, if they are managed by this component.
|
InputStream |
retrievePackageBits(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
When a remote client wants to see the actual data content for an installed package, this method will be called.
|
void |
start(ResourceContext<BytemanAgentComponent> context)
Start the management component.
|
void |
stop()
Called when the resource component will no longer manage the remote Byteman agent.
|
void |
updateResourceConfiguration(ConfigurationUpdateReport report) |
public void start(ResourceContext<BytemanAgentComponent> context)
start in interface ResourceComponent<BytemanAgentComponent>ResourceComponent.start(ResourceContext)public void stop()
stop in interface ResourceComponent<BytemanAgentComponent>ResourceComponent.stop()public org.rhq.core.domain.measurement.AvailabilityType getAvailability()
getAvailability in interface AvailabilityFacetAvailabilityFacet.getAvailability()public void getValues(org.rhq.core.domain.measurement.MeasurementReport report,
Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
getValues in interface MeasurementFacetMeasurementFacet.getValues(MeasurementReport, Set)public org.rhq.core.domain.configuration.Configuration loadResourceConfiguration()
throws Exception
loadResourceConfiguration in interface ConfigurationFacetExceptionpublic void updateResourceConfiguration(ConfigurationUpdateReport report)
updateResourceConfiguration in interface ConfigurationFacetpublic OperationResult invokeOperation(String name, org.rhq.core.domain.configuration.Configuration configuration)
invokeOperation in interface OperationFacetOperationFacet.invokeOperation(String, Configuration)public Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> discoverDeployedPackages(org.rhq.core.domain.content.PackageType type)
discoverDeployedPackages in interface ContentFacetContentFacet.discoverDeployedPackages(PackageType)public org.rhq.core.domain.content.transfer.DeployPackagesResponse deployPackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages, ContentServices contentServices)
deployPackages in interface ContentFacetContentFacet.deployPackages(Set, ContentServices)public InputStream retrievePackageBits(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
retrievePackageBits in interface ContentFacetContentFacet.retrievePackageBits(ResourcePackageDetails)public List<org.rhq.core.domain.content.transfer.DeployPackageStep> generateInstallationSteps(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails)
generateInstallationSteps in interface ContentFacetpublic org.rhq.core.domain.content.transfer.RemovePackagesResponse removePackages(Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> packages)
removePackages in interface ContentFacetContentFacet.removePackages(Set)public CreateResourceReport createResource(CreateResourceReport report)
createResource in interface CreateChildResourceFacetCreateChildResourceFacet.createResource(CreateResourceReport)public org.jboss.byteman.agent.submit.Submit getBytemanClient()
public Map<String,String> getAllKnownScripts()
the client.null
if a problem occurred attempting to get the scriptspublic File getPackageFile(org.rhq.core.domain.content.transfer.ResourcePackageDetails packageDetails) throws Exception
packageDetails - details describing the fileException - if the file could not be determinedpublic File getBootJarsDataDirectory()
public File getSystemJarsDataDirectory()
public File getScriptsDataDirectory()
public File getResourceDataDirectory(String suffix)
suffix is the last part of the file path, essentially providing a specific
location for different kinds of content for the component.suffix - identifies a specific location under a general data directory for this component.Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.