public class RepoProvider extends Object implements ContentProvider, PackageSource
| Constructor and Description |
|---|
RepoProvider() |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream(String location)
Get an input stream for the specified package (bits).
|
SyncProgressWeight |
getSyncProgressWeight() |
void |
initialize(Configuration configuration)
Initializes the adapter with the specified configuration.
|
void |
shutdown()
Shutdown the adapter.
|
void |
synchronizePackages(String repoName,
PackageSyncReport report,
Collection<ContentProviderPackageDetails> existingPackages)
Synchronizes the packages contained within the yum repo.
|
void |
testConnection()
Test's the adapter's connection.
|
public void initialize(Configuration configuration) throws Exception
| path | A file system root directory or mount point |
| url | A base URL for a yum repo |
initialize in interface ContentProviderconfiguration - The adapter's configuration propeties.Exception - On errors.public void shutdown()
shutdown in interface ContentProviderpublic InputStream getInputStream(String location) throws Exception
getInputStream in interface PackageSourcelocation - The location relative to the baseurl.Exception - On all errors.public void synchronizePackages(String repoName, PackageSyncReport report, Collection<ContentProviderPackageDetails> existingPackages) throws SyncException, InterruptedException
synchronizePackages in interface PackageSourcerepoName - report - A report to fill in.existingPackages - A collection of package specifications already in inventory.Exception - On all errors.SyncExceptionInterruptedExceptionpublic void testConnection()
throws Exception
testConnection in interface ContentProviderException - When connection is not functional for any reason.public SyncProgressWeight getSyncProgressWeight()
getSyncProgressWeight in interface ContentProviderCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.