org.rhq.core.clientapi.agent.content
Interface ContentAgentService


public interface ContentAgentService

The interface to the agent's content subsystem that the server can call into.


Method Summary
 void deletePackages(DeletePackagesRequest request)
          Deletes existing content from a resource.
 void deployPackages(DeployPackagesRequest request)
          Begins the process of deploying a new set of versioned packages of content to a resource.
 ContentDiscoveryReport executeResourcePackageDiscoveryImmediately(int resourceId, String packageTypeName)
          Immediately triggers a content discovery.
 Set<ResourcePackageDetails> getLastDiscoveredResourcePackages(int resourceId)
          Returns all content known for the resource as of the last discovery that was executed.
 void retrievePackageBits(RetrievePackageBitsRequest request)
          Requests the plugin retrieve the content for a specified package and send the data to the server.
 List<DeployPackageStep> translateInstallationSteps(int resourceId, ResourcePackageDetails packageDetails)
          Requests that the plugin translate the package's metadata into domain specific installation instructions.
 

Method Detail

getLastDiscoveredResourcePackages

Set<ResourcePackageDetails> getLastDiscoveredResourcePackages(int resourceId)
Returns all content known for the resource as of the last discovery that was executed. In other words, this returns the installed packages known to the Plugin Container for the resource without triggering another discovery.

Parameters:
resourceId - identifies the resource
Returns:
installed packages for the resource; null if no content exist for the resource or if a previous discovery has not taken place

executeResourcePackageDiscoveryImmediately

ContentDiscoveryReport executeResourcePackageDiscoveryImmediately(int resourceId,
                                                                  String packageTypeName)
                                                                  throws PluginContainerException
Immediately triggers a content discovery. The discovery will be executed against the specified resource for the specified package type.

Parameters:
resourceId - resource against which the discovery will be made; must correspond to a valid resource in the plugin container's inventory
packageTypeName - name of the type of package to discover in the scan
Returns:
report of discovered content
Throws:
PluginContainerException - if an error occurs at any point in the discovery (including in the plugin itself)

translateInstallationSteps

List<DeployPackageStep> translateInstallationSteps(int resourceId,
                                                   ResourcePackageDetails packageDetails)
                                                   throws PluginContainerException
Requests that the plugin translate the package's metadata into domain specific installation instructions. These instructions can then be displayed to the user. Additionally, once the call to deployPackages(org.rhq.core.domain.content.transfer.DeployPackagesRequest) is made, the results of each individual step will be reported. Installation steps are optional. This method may return null if the plugin chooses to not express the installation in terms of steps.

Parameters:
resourceId - identifies the resource against which the package in question will be deployed
packageDetails - contains metadata that describes the package to be installed, including the configuration values specified by the user for this deployment (these values may factor into the translation of the steps)
Returns:
list of steps if the package deployment can be defined in such terms; null if the plugin chooses not to explicitly describe its steps
Throws:
PluginContainerException - if an error occurs at any point, including in the plugin itself

deployPackages

void deployPackages(DeployPackagesRequest request)
Begins the process of deploying a new set of versioned packages of content to a resource. The plugin will call back into the server to retrieve the bits for the package at a later time. Additionally, the plugin may determine more packages need be installed, in which case the plugin container will be responsible for notifying the server of the new dependencies. Note that this method should not throw any exceptions; instead, all error conditions should be indicated in the response to this request.

Parameters:
request - information necessary to know what content to deploy (must not be null)

deletePackages

void deletePackages(DeletePackagesRequest request)
Deletes existing content from a resource. Note that this method should not throw any exceptions; instead all error conditions should be indicated in the response to this request.

Parameters:
request - information necessary to know what content to delete (must not be null)

retrievePackageBits

void retrievePackageBits(RetrievePackageBitsRequest request)
Requests the plugin retrieve the content for a specified package and send the data to the server. Note that this method should not throw any exceptions; instead all error conditions should be indicated in the response to this request.

Parameters:
request - information necessary to know what content to retrieve (must not be null)


Copyright © 2008-2009 Red Hat, Inc.. All Rights Reserved.