org.rhq.core.clientapi.server.bundle
Interface BundleServerService


public interface BundleServerService

Interface for agents to use when needing to inform the server about bundle tasks. Implementations of this interface, once registered with the plugin container, will received the requests that were issued updated with the operation results.

Author:
John Mazzitelli

Method Summary
 void addDeploymentHistory(int bundleDeploymentId, org.rhq.core.domain.bundle.BundleResourceDeploymentHistory history)
           
 long downloadPackageBits(org.rhq.core.domain.content.PackageVersion packageVersion, OutputStream outputStream)
          Requests that the server download and stream the bits for the specified package version.
 List<org.rhq.core.domain.content.PackageVersion> getAllBundleVersionPackageVersions(int bundleVersionId)
           
 void setBundleDeploymentStatus(int bundleDeploymentId, org.rhq.core.domain.bundle.BundleDeploymentStatus status)
          Set the (completion) status of a deployment.
 

Method Detail

addDeploymentHistory

@Asynchronous(guaranteedDelivery=true)
void addDeploymentHistory(int bundleDeploymentId,
                                                         org.rhq.core.domain.bundle.BundleResourceDeploymentHistory history)

downloadPackageBits

@Timeout(value=2700000L)
@LimitedConcurrency(value="rhq.server.concurrency-limit.content-download")
long downloadPackageBits(org.rhq.core.domain.content.PackageVersion packageVersion,
                                                              OutputStream outputStream)
Requests that the server download and stream the bits for the specified package version. If the package cannot be found, an exception will be thrown.

Parameters:
packageVersion - identifies the package to download
outputStream - an output stream where the server should write the package contents. It is up to the caller to prepare this output stream in order to write the package content to an appropriate location.
Returns:
the number of bytes written to the output stream - this is the size of the package version that was downloaded

getAllBundleVersionPackageVersions

List<org.rhq.core.domain.content.PackageVersion> getAllBundleVersionPackageVersions(int bundleVersionId)

setBundleDeploymentStatus

@Asynchronous(guaranteedDelivery=true)
void setBundleDeploymentStatus(int bundleDeploymentId,
                                                              org.rhq.core.domain.bundle.BundleDeploymentStatus status)
Set the (completion) status of a deployment. If required, detailed messages should be provided via addDeploymentHistory(). Deployments are automatically initialized to IN_PROGRESS.

Parameters:
bundleDeploymentId -
status -


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