|
||||||||||
| 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 | |
|---|---|
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 |
scheduleSyncJob(ContentSource contentSource)
This will schedule the sync job for the given content source. |
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 |
syncNow(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 |
unscheduleSyncJob(ContentSource contentSource)
This will unschedule the sync job for the given content source. |
| Methods inherited from class org.rhq.enterprise.server.plugin.pc.AbstractTypeServerPluginContainer |
|---|
getLog, getMasterServerPluginContainer, getPluginManager, 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 java.lang.Exception
AbstractTypeServerPluginContainer
initialize in class AbstractTypeServerPluginContainerjava.lang.Exception - if the plugin container failed to initialize for some reasonpublic void start()
AbstractTypeServerPluginContainerloaded.
start in class AbstractTypeServerPluginContainerpublic void shutdown()
AbstractTypeServerPluginContainer
shutdown in class AbstractTypeServerPluginContainer
public void scheduleAllPluginJobs()
throws java.lang.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 AbstractTypeServerPluginContainerjava.lang.Exception - 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 syncNow(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 scheduleSyncJob(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 -
org.quartz.SchedulerException - if failed to schedule the jobpublic void scheduleSyncJobs()
public void unscheduleSyncJob(ContentSource contentSource)
throws org.quartz.SchedulerException
contentSource -
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 | |||||||||