|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rhq.plugins.byteman.BytemanAgentComponent
public class BytemanAgentComponent
Component that represents the remote Byteman agent listening for requests. A note about adding boot/system classpath jars and the content this component supports related to that feature. There are operations this component supports to add jars to the byteman classpath. Those operations tell the byteman agent to add jars, but those jars must already exist and be accessible for the byteman agent to do so. This component will not manage the jars added via the operations. If, however, a user pushes jar content from the RHQ server to this plugin via the content facet, those jars will be managed by this component as they are added to the byteman agent.
Constructor Summary | |
---|---|
BytemanAgentComponent()
|
Method Summary | |
---|---|
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. |
DeployPackagesResponse |
deployPackages(Set<ResourcePackageDetails> packages,
ContentServices contentServices)
Deploys boot and system classpath jars to the Byteman agent. |
Set<ResourcePackageDetails> |
discoverDeployedPackages(PackageType type)
Detects the different content for the Byteman agent. |
List<DeployPackageStep> |
generateInstallationSteps(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. |
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(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(MeasurementReport report,
Set<MeasurementScheduleRequest> requests)
The plugin container will call this method when metrics are to be collected. |
OperationResult |
invokeOperation(String name,
Configuration configuration)
The plugin container will call this method when it wants to invoke an operation on the Byteman agent. |
Configuration |
loadResourceConfiguration()
|
RemovePackagesResponse |
removePackages(Set<ResourcePackageDetails> packages)
Removes the packages, if they are managed by this component. |
InputStream |
retrievePackageBits(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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BytemanAgentComponent()
Method Detail |
---|
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 AvailabilityType getAvailability()
getAvailability
in interface AvailabilityFacet
AvailabilityFacet.getAvailability()
public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests)
getValues
in interface MeasurementFacet
MeasurementFacet.getValues(MeasurementReport, Set)
public Configuration loadResourceConfiguration() throws Exception
loadResourceConfiguration
in interface ConfigurationFacet
Exception
public void updateResourceConfiguration(ConfigurationUpdateReport report)
updateResourceConfiguration
in interface ConfigurationFacet
public OperationResult invokeOperation(String name, Configuration configuration)
invokeOperation
in interface OperationFacet
OperationFacet.invokeOperation(String, Configuration)
public Set<ResourcePackageDetails> discoverDeployedPackages(PackageType type)
discoverDeployedPackages
in interface ContentFacet
ContentFacet.discoverDeployedPackages(PackageType)
public DeployPackagesResponse deployPackages(Set<ResourcePackageDetails> packages, ContentServices contentServices)
deployPackages
in interface ContentFacet
ContentFacet.deployPackages(Set, ContentServices)
public InputStream retrievePackageBits(ResourcePackageDetails packageDetails)
retrievePackageBits
in interface ContentFacet
ContentFacet.retrievePackageBits(ResourcePackageDetails)
public List<DeployPackageStep> generateInstallationSteps(ResourcePackageDetails packageDetails)
generateInstallationSteps
in interface ContentFacet
public RemovePackagesResponse removePackages(Set<ResourcePackageDetails> packages)
removePackages
in interface ContentFacet
ContentFacet.removePackages(Set)
public CreateResourceReport createResource(CreateResourceReport report)
createResource
in interface CreateChildResourceFacet
CreateChildResourceFacet.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(ResourcePackageDetails packageDetails) throws Exception
packageDetails
- details describing the file
Exception
- 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.
protected void addDeployedClasspathJars() throws Exception
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |