|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.plugin.pc.AbstractTypeServerPluginContainer
org.rhq.enterprise.server.plugin.pc.content.ContentServerPluginContainer
public class ContentServerPluginContainer
The container responsible for managing the lifecycle of content server-side plugins.
| Constructor Summary | |
|---|---|
ContentServerPluginContainer(MasterServerPluginContainer master)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.rhq.enterprise.server.plugin.pc.AbstractTypeServerPluginContainer |
|---|
getLog, getMasterServerPluginContainer, getPluginLoadTime, getPluginManager, invokePluginControl, isPluginEnabled, isPluginLoaded, loadPlugin, reloadPlugin, scheduleJob, schedulePluginJobs, stop, unloadPlugin, unschedulePluginJobs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContentServerPluginContainer(MasterServerPluginContainer master)
| Method Detail |
|---|
public void initialize()
throws Exception
AbstractTypeServerPluginContainer
initialize 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()
AbstractTypeServerPluginContainer
shutdown in class AbstractTypeServerPluginContainer
public 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()
AbstractTypeServerPluginContainer
getSupportedServerPluginType 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 sync
org.quartz.SchedulerException - if failed to schedule the job for immediate execution
public void syncRepoNow(org.rhq.core.domain.content.Repo repo)
throws org.quartz.SchedulerException
repo - cannot be null
org.quartz.SchedulerException - if the job cannot be scheduled
public void cancelRepoSync(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.content.Repo repo)
throws org.quartz.SchedulerException
org.quartz.SchedulerException
public 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 sync
org.quartz.SchedulerException - if failed to schedule the job
public 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 sync
org.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 null
org.quartz.SchedulerException - if failed to unschedule the job
public void unscheduleRepoSyncJob(org.rhq.core.domain.content.Repo repo)
throws org.quartz.SchedulerException
repo - cannot be null
org.quartz.SchedulerException - if failed to unschedule the jobprotected ServerPluginManager createPluginManager()
AbstractTypeServerPluginContainer
createPluginManager 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||