|
||||||||||
| 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
public abstract class AbstractTypeServerPluginContainer
The abstract superclass for all plugin containers of the different plugin types.
| Constructor Summary | |
|---|---|
AbstractTypeServerPluginContainer(MasterServerPluginContainer master)
Instantiates the plugin container. |
|
| Method Summary | |
|---|---|
protected ServerPluginManager |
createPluginManager()
This will be called when its time for this plugin container to create its plugin manager. |
protected org.apache.commons.logging.Log |
getLog()
Returns the logger that can be used to log messages. |
MasterServerPluginContainer |
getMasterServerPluginContainer()
Returns the master plugin container that is responsible for managing this instance. |
ServerPluginManager |
getPluginManager()
Returns the object that manages the plugins. |
abstract 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 |
loadPlugin(ServerPluginEnvironment env,
boolean enabled)
Informs the plugin container that it has a plugin that it must begin to start managing. |
void |
reloadPlugin(PluginKey pluginKey,
boolean enabled)
Informs the plugin container that a plugin should be reloaded and any of its resources should be started if being enabled. |
void |
scheduleAllPluginJobs()
If a plugin has scheduled jobs, this method will schedule them now. |
protected void |
scheduleJob(ScheduledJobDefinition schedule,
PluginKey pluginKey)
Schedules a job for periodic execution. |
void |
schedulePluginJobs(PluginKey pluginKey)
|
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 |
stop()
This will inform the plugin container that it must stop doing its work. |
void |
unloadPlugin(PluginKey pluginKey)
Informs the plugin container that a plugin should be unloaded and any of its resources should be released. |
void |
unschedulePluginJobs(PluginKey pluginKey)
Unschedules any plugin jobs that are currently scheduled for the named plugin. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractTypeServerPluginContainer(MasterServerPluginContainer master)
master - the master plugin container that is creating this instance.| Method Detail |
|---|
public abstract ServerPluginType getSupportedServerPluginType()
public MasterServerPluginContainer getMasterServerPluginContainer()
public ServerPluginManager getPluginManager()
public void initialize()
throws java.lang.Exception
java.lang.Exception - if the plugin container failed to initialize for some reasonpublic void start()
loaded.
public void stop()
shutdown().
public void shutdown()
public void loadPlugin(ServerPluginEnvironment env,
boolean enabled)
throws java.lang.Exception
env - the plugin environment, including the plugin jar and its descriptorenabled - true if the plugin should be initialized; false if
the plugin's existence should be noted but it should not be initialized or started
java.lang.Exception - if failed to load the plugin
public void unloadPlugin(PluginKey pluginKey)
throws java.lang.Exception
pluginKey - identifies the plugin that should be shutdown
java.lang.Exception - if failed to unload the plugin
public void reloadPlugin(PluginKey pluginKey,
boolean enabled)
throws java.lang.Exception
pluginKey - identifies the plugin that should be reloadedenabled - indicates if the plugin should be enabled or disabled after being loaded
java.lang.Exception - if failed to unload the plugin
public void scheduleAllPluginJobs()
throws java.lang.Exception
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.
java.lang.Exception - if failed to schedule jobs
public void schedulePluginJobs(PluginKey pluginKey)
throws java.lang.Exception
java.lang.Exception
public void unschedulePluginJobs(PluginKey pluginKey)
throws java.lang.Exception
stop() method because we never want
to unschedule jobs since other plugin containers on other servers may be running
and able to process the jobs. This method should only be called when a plugin
is being disabled or removed.
pluginKey -
java.lang.Exception - if failed to unschedule jobsprotected ServerPluginManager createPluginManager()
protected org.apache.commons.logging.Log getLog()
protected void scheduleJob(ScheduledJobDefinition schedule,
PluginKey pluginKey)
throws java.lang.Exception
schedule indicates the
job is not enabled, this method returns immediately as a no-op.
schedule - instructs how the job should be scheduledpluginKey - the key of the plugin scheduling the job
java.lang.Exception - if failed to schedule the job
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||