public interface ContentServerService
| Modifier and Type | Field and Description |
|---|---|
static String |
CONCURRENCY_LIMIT_CONTENT_DOWNLOAD
Concurrency control setting to limit the number of packages that can be downloaded.
|
static String |
CONCURRENCY_LIMIT_CONTENT_REPORT
Concurrency control parameter to limit the number of content reports that are handled.
|
| Modifier and Type | Method and Description |
|---|---|
void |
completeDeletePackageRequest(org.rhq.core.domain.content.transfer.RemovePackagesResponse response)
Informs the server that a previous request to delete a package has completed.
|
void |
completeDeployPackageRequest(org.rhq.core.domain.content.transfer.DeployPackagesResponse response)
Informs the server that a previous request to deploy a package has completed.
|
void |
completeRetrievePackageBitsRequest(ContentServiceResponse response,
InputStream contentStream)
Informs the server that a previous request to get a package's bits has completed.
|
long |
downloadPackageBitsForChildResource(int parentResourceId,
String resourceTypeName,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream)
Downloads the package bits used to create a package used as the backing of a resource.
|
long |
downloadPackageBitsGivenResource(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream)
Requests that the server download and stream the bits for the specified package.
|
long |
downloadPackageBitsRangeGivenResource(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey,
OutputStream outputStream,
long startByte,
long endByte)
Requests that the server download and stream the bits for the specified package.
|
long |
getPackageBitsLength(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey)
Requests the size, in bytes, of the identified package version.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.PackageVersionMetadataComposite> |
getPackageVersionMetadata(int resourceId,
org.rhq.core.domain.util.PageControl pc)
Requests all
metadata for all package versions that the given resource
component is subscribed to (see Repo.getResources(). |
String |
getResourceSubscriptionMD5(int resourceId)
Gets the MD5 hash of the resource's "content subscription".
|
Set<org.rhq.core.domain.content.transfer.ResourcePackageDetails> |
loadDependencies(int requestId,
Set<org.rhq.core.domain.content.PackageDetailsKey> dependencyPackages)
Informs the server that a package installation (as indicated in the specified request ID) requires dependency
packages to be installed.
|
void |
mergeDiscoveredPackages(ContentDiscoveryReport report)
Sends a set of newly discovered packages to the server.
|
boolean |
preLoadRemoteContent(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey)
Requests loading of lazy loaded package.
|
static final String CONCURRENCY_LIMIT_CONTENT_REPORT
static final String CONCURRENCY_LIMIT_CONTENT_DOWNLOAD
@Asynchronous(guaranteedDelivery=true) @LimitedConcurrency(value="rhq.server.concurrency-limit.content-report") void mergeDiscoveredPackages(ContentDiscoveryReport report)
report - report containing the current set of packages installed on the resource.@Asynchronous(guaranteedDelivery=true) void completeDeployPackageRequest(org.rhq.core.domain.content.transfer.DeployPackagesResponse response)
response - indicates the original request and the result of executing it@Asynchronous(guaranteedDelivery=true) void completeDeletePackageRequest(org.rhq.core.domain.content.transfer.RemovePackagesResponse response)
response - indicates the original request and the result of executing it@Asynchronous(guaranteedDelivery=true) void completeRetrievePackageBitsRequest(ContentServiceResponse response, InputStream contentStream)
response - indicates the original request and the result of executing itcontentStream - stream of the package bits being retrievedSet<org.rhq.core.domain.content.transfer.ResourcePackageDetails> loadDependencies(int requestId, Set<org.rhq.core.domain.content.PackageDetailsKey> dependencyPackages)
requestId - refers back to the request ID of the package deployment for which these dependencies
were founddependencyPackages - provides information on the dependency package (name, type, version, architecture);@Timeout(value=2700000L) @LimitedConcurrency(value="rhq.server.concurrency-limit.content-download") long downloadPackageBitsGivenResource(int resourceId, org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey, OutputStream outputStream)
resourceId - identifies the resource to which the bits will be installedpackageDetailsKey - identifies the package to downloadoutputStream - 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.@Timeout(value=2700000L) @LimitedConcurrency(value="rhq.server.concurrency-limit.content-download") long downloadPackageBitsRangeGivenResource(int resourceId, org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey, OutputStream outputStream, long startByte, long endByte)
resourceId - identifies the resource to which the bits will be installedpackageDetailsKey - identifies the package to downloadoutputStream - 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.startByte - the first byte (inclusive) of the byte range to retrieve and output (bytes start at
index 0)endByte - the last byte (inclusive) of the byte range to retrieve and output (-1 means up to EOF)
(bytes start at index 0)@Timeout(value=2700000L) @LimitedConcurrency(value="rhq.server.concurrency-limit.content-download") long downloadPackageBitsForChildResource(int parentResourceId, String resourceTypeName, org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey, OutputStream outputStream)
parentResourceId - identifies the parent resource under which the new resource is being createdresourceTypeName - type of child resource being createdpackageDetailsKey - package being used to create the child resourceoutputStream - 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.@LimitedConcurrency(value="rhq.server.concurrency-limit.content-download") org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.PackageVersionMetadataComposite> getPackageVersionMetadata(int resourceId, org.rhq.core.domain.util.PageControl pc)
metadata for all package versions that the given resource
component is subscribed to (see Repo.getResources(). The returned object has the metadata bytes that
are meaningful to the calling plugin component.
Callers should consider caching the returned metadata. Use getResourceSubscriptionMD5(int) to get the
MD5 hashcode of the metadata for the resource to aid in determining when a cache of metadata is stale.
resourceId - identifies the resource requesting the data; all package versions in all the resource's
subscribed repos will be represented in the returned mappc - this method can potentially return a large set; this page control object allows the caller to
page through that large set, as opposed to requesting the entire set in one large chunkString getResourceSubscriptionMD5(int resourceId)
resourceId - identifies the resource requesting the MD5; if any change to any package version in any
resource's subscribed repos will be used when generating the MD5getPackageVersionMetadata(int, PageControl)long getPackageBitsLength(int resourceId,
org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey)
resourceId - identifies the resource requesting the infopackageDetailsKey - identifies the package whose size is to be returned@Timeout(value=5400000L) @LimitedConcurrency(value="rhq.server.concurrency-limit.content-download") boolean preLoadRemoteContent(int resourceId, org.rhq.core.domain.content.PackageDetailsKey packageDetailsKey)
resourceId - packageDetailsKey - Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.