public class ContentServerPluginContainer extends AbstractTypeServerPluginContainer
| Constructor and Description |
|---|
ContentServerPluginContainer(MasterServerPluginContainer master) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelRepoSync(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.Repo repo) |
protected ContentProviderManager |
createAdapterManager()
Creates the adapter manager that the PC will use.
|
protected ServerPluginManager |
createPluginManager()
This will be called when its time for this plugin container to create its plugin manager.
|
ContentProviderManager |
getAdapterManager()
Returns the object that is responsible for managing all
adapters which are the
things that know how to download content from a specific ContentSource. |
ServerPluginType |
getSupportedServerPluginType()
Each plugin container will tell the master which plugins it can support via this method; this
method returns the type of plugin that the plugin container can process.
|
void |
initialize()
The initialize method that prepares the plugin container.
|
void |
scheduleAllPluginJobs()
If a plugin has scheduled jobs, this method will schedule them now.
|
void |
scheduleProviderSyncJob(org.rhq.core.domain.content.ContentSource contentSource)
This will schedule the sync job for the given content source.
|
void |
scheduleRepoSyncJob(org.rhq.core.domain.content.Repo repo)
This will schedule the sync job for the given repository.
|
void |
scheduleSyncJobs()
It will schedule one job per adapter such that each adapter is scheduled to be synchronized as per its defined
sync schedule.
|
void |
shutdown()
The shutdown method that will stop and unload all plugins.
|
void |
start()
This method informs the plugin container that all of its plugins have been loaded.
|
void |
syncProviderNow(org.rhq.core.domain.content.ContentSource contentSource)
This will syncronize the given content source, meaning its
PackageVersions will be updated and, if not
lazy-loading, will load the package versions that are not loaded yet. |
void |
syncRepoNow(org.rhq.core.domain.content.Repo repo)
Causes the given repo to be scheduled for an immediate sync.
|
void |
unscheduleProviderSyncJob(org.rhq.core.domain.content.ContentSource contentSource)
This will unschedule the sync job for the given content source.
|
void |
unscheduleRepoSyncJob(org.rhq.core.domain.content.Repo repo)
This will unschedule the sync job for the given Repo.
|
getLog, getMasterServerPluginContainer, getPluginLoadTime, getPluginManager, invokePluginControl, isPluginEnabled, isPluginLoaded, loadPlugin, reloadPlugin, scheduleJob, schedulePluginJobs, stop, unloadPlugin, unschedulePluginJobspublic ContentServerPluginContainer(MasterServerPluginContainer master)
public void initialize()
throws Exception
AbstractTypeServerPluginContainerinitialize in class AbstractTypeServerPluginContainerException - if the plugin container failed to initialize for some reasonpublic void start()
AbstractTypeServerPluginContainerAbstractTypeServerPluginContainer.loadPlugin(ServerPluginEnvironment, boolean) loaded}.start in class AbstractTypeServerPluginContainerpublic void shutdown()
AbstractTypeServerPluginContainershutdown in class AbstractTypeServerPluginContainerpublic void scheduleAllPluginJobs()
throws Exception
AbstractTypeServerPluginContainerAbstractTypeServerPluginContainer.start() method because it is possible that
the plugin container has been started before the scheduler has. In this case, the caller
must wait for the scheduler to be started before this method is called to schedule jobs.scheduleAllPluginJobs in class AbstractTypeServerPluginContainerException - if failed to schedule jobspublic ServerPluginType getSupportedServerPluginType()
AbstractTypeServerPluginContainergetSupportedServerPluginType in class AbstractTypeServerPluginContainerpublic ContentProviderManager getAdapterManager()
adapters which are the
things that know how to download content from a specific ContentSource.public void syncProviderNow(org.rhq.core.domain.content.ContentSource contentSource)
throws org.quartz.SchedulerException
PackageVersions will be updated and, if not
lazy-loading, will load the package versions that are not loaded yet.
Note that this will perform the sync asynchronously in a separate thread. This is because this sync operation can potentially run for hours and we do not want to block the calling thread.
contentSource - the content source to syncorg.quartz.SchedulerException - if failed to schedule the job for immediate executionpublic void syncRepoNow(org.rhq.core.domain.content.Repo repo)
throws org.quartz.SchedulerException
repo - cannot be nullorg.quartz.SchedulerException - if the job cannot be scheduledpublic void cancelRepoSync(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.Repo repo)
throws org.quartz.SchedulerException
org.quartz.SchedulerExceptionpublic void scheduleProviderSyncJob(org.rhq.core.domain.content.ContentSource contentSource)
throws org.quartz.SchedulerException
schedule.
If the content source's sync schedule is empty, this method assumes it should not be automatically sync'ed, so no schedule will be created, and this method simply returns.
contentSource - provider to syncorg.quartz.SchedulerException - if failed to schedule the jobpublic void scheduleRepoSyncJob(org.rhq.core.domain.content.Repo repo)
throws org.quartz.SchedulerException
schedule.
If the repository's sync schedule is empty, this method assumes it should not be automatically sync'ed, so no schedule will be created, and this method simply returns.
repo - repository to syncorg.quartz.SchedulerException - if failed to schedule the jobpublic void scheduleSyncJobs()
public void unscheduleProviderSyncJob(org.rhq.core.domain.content.ContentSource contentSource)
throws org.quartz.SchedulerException
contentSource - cannot be nullorg.quartz.SchedulerException - if failed to unschedule the jobpublic void unscheduleRepoSyncJob(org.rhq.core.domain.content.Repo repo)
throws org.quartz.SchedulerException
repo - cannot be nullorg.quartz.SchedulerException - if failed to unschedule the jobprotected ServerPluginManager createPluginManager()
AbstractTypeServerPluginContainercreatePluginManager in class AbstractTypeServerPluginContainerprotected ContentProviderManager createAdapterManager()
This is protected scope so subclasses can define their own adapter manager to use. This is mainly to support tests.
Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.