org.rhq.plugins.platform.content.yum
Interface YumContext

All Known Implementing Classes:
PluginContext

public interface YumContext


Method Summary
 String basepath()
          Get the path part of the base URL for yum requests.
 URL baseurl()
          Get the base URL for yum requests.
 long getMetadataCacheTimeout()
          Get the metadata timeout, in milliseconds.
 long getPackageBitsLength(org.rhq.core.domain.content.PackageDetailsKey key)
          Get the length in bytes of the specified package.
 org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.PackageVersionMetadataComposite> getPackageVersionMetadata(org.rhq.core.domain.util.PageControl pc)
          Get a list of all metadata entries for all packages mapped to the specified resource.
 org.rhq.core.domain.configuration.Configuration getPluginConfiguration()
          Returns the plugin configuration.
 String getResourceSubscriptionMD5()
          Get the MD5 of the resource's content subscription.
 File getTemporaryDirectory()
          Get a reference to the temporary directory to be used for file construction and staging.
 int port()
          Get the port specified in the base URL for yum requests.
 long writePackageBits(org.rhq.core.domain.content.PackageDetailsKey key, long[] range, OutputStream ostr)
          Write the specified package bits to the specified stream.
 long writePackageBits(org.rhq.core.domain.content.PackageDetailsKey key, OutputStream ostr)
          Write the specified package bits to the specified stream.
 

Method Detail

baseurl

URL baseurl()
Get the base URL for yum requests.

Returns:
The base URL for yum requests.

basepath

String basepath()
Get the path part of the base URL for yum requests.

Returns:
The path part of the base URL.

port

int port()
Get the port specified in the base URL for yum requests.

Returns:
The port specified in the base URL.

writePackageBits

long writePackageBits(org.rhq.core.domain.content.PackageDetailsKey key,
                      OutputStream ostr)
Write the specified package bits to the specified stream.

Parameters:
key - The package key used to specify the package version.
ostr - An open output stream.
Returns:
The number of bytes written to the stream.

writePackageBits

long writePackageBits(org.rhq.core.domain.content.PackageDetailsKey key,
                      long[] range,
                      OutputStream ostr)
Write the specified package bits to the specified stream.

Parameters:
key - The package key used to specify the package version.
range - The byte range to write (range[0]=first-byte, range[1]=last-byte).
ostr - An open output stream.
Returns:
The number of bytes written to the stream.

getPackageBitsLength

long getPackageBitsLength(org.rhq.core.domain.content.PackageDetailsKey key)
Get the length in bytes of the specified package.

Parameters:
key - The package key used to specify the package version.
Returns:
The length in bytes.

getPackageVersionMetadata

org.rhq.core.domain.util.PageList<org.rhq.core.domain.content.composite.PackageVersionMetadataComposite> getPackageVersionMetadata(org.rhq.core.domain.util.PageControl pc)
Get a list of all metadata entries for all packages mapped to the specified resource.

Parameters:
pc - A page control.
Returns:
A collection of package version metadata blobs.

getResourceSubscriptionMD5

String getResourceSubscriptionMD5()
Get the MD5 of the resource's content subscription.

Returns:
MD5 hashcode that identifies the resource content subscription contents

getTemporaryDirectory

File getTemporaryDirectory()
Get a reference to the temporary directory to be used for file construction and staging.

Returns:
The temporary file location.

getPluginConfiguration

org.rhq.core.domain.configuration.Configuration getPluginConfiguration()
Returns the plugin configuration.

Returns:
plugin configuration

getMetadataCacheTimeout

long getMetadataCacheTimeout()
Get the metadata timeout, in milliseconds. We assume cached metadata is still valid.

Returns:
The timeout, in milliseconds


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