public class ServerPluginService extends Object implements ServerPluginServiceMBean
MasterServerPluginContainer. It will be started when the entire server starts and shutdown when the entire
server shuts down. It has a management interface to allow it to be recycled on demand when desired.OBJECT_NAME, OBJECT_NAME_STR| Constructor and Description |
|---|
ServerPluginService() |
| Modifier and Type | Method and Description |
|---|---|
protected MasterServerPluginContainer |
createMasterPluginContainer()
This will create, configure and initialize the plugin container and return it.
|
MasterServerPluginContainer |
getMasterPluginContainer()
Returns the master server plugin container that will be responsible for managing all plugins of all types and their classloaders.
|
File |
getServerPluginsDirectory()
Returns the directory where the server plugins are found.
|
boolean |
isMasterPluginContainerStarted()
Returns
true if the master plugin container has be started. |
boolean |
isStarted()
Returns
true if this service has been started. |
void |
restartMasterPluginContainer()
Convienence method that first does a
ServerPluginServiceMBean.stopMasterPluginContainer() and then a ServerPluginServiceMBean.startMasterPluginContainer(). |
void |
start()
Starts the service but will not start the
master plugin container. |
void |
startMasterPluginContainer()
Starts the
master plugin container which will load in all plugins, start them and then
schedule all jobs for all plugins. |
void |
startMasterPluginContainerWithoutSchedulingJobs()
Similar to
ServerPluginServiceMBean.startMasterPluginContainer(), but this will not tell the master plugin container
to schedule any jobs yet. |
void |
stop()
Shuts down this service along with the
master plugin container. |
void |
stopMasterPluginContainer()
Stops the
master plugin container which will shuts down all plugins. |
public void start()
ServerPluginServiceMBeanmaster plugin container. After the server
fully initializes, it should only then start the master server-side plugin container.start in interface ServerPluginServiceMBeanpublic void startMasterPluginContainer()
ServerPluginServiceMBeanmaster plugin container which will load in all plugins, start them and then
schedule all jobs for all plugins. You cannot start the plugin container unless this service has
been started. If the master plugin container is already started,
this does nothing and returns. You must ensure the job scheduler is started prior to calling this method.startMasterPluginContainer in interface ServerPluginServiceMBeanServerPluginServiceMBean.startMasterPluginContainerWithoutSchedulingJobs()public void stopMasterPluginContainer()
ServerPluginServiceMBeanmaster plugin container which will shuts down all plugins. If the master
plugin container is already shutdown, this does nothing and returns.stopMasterPluginContainer in interface ServerPluginServiceMBeanpublic void stop()
ServerPluginServiceMBeanmaster plugin container.stop in interface ServerPluginServiceMBeanpublic void restartMasterPluginContainer()
ServerPluginServiceMBeanServerPluginServiceMBean.stopMasterPluginContainer() and then a ServerPluginServiceMBean.startMasterPluginContainer().restartMasterPluginContainer in interface ServerPluginServiceMBeanpublic void startMasterPluginContainerWithoutSchedulingJobs()
ServerPluginServiceMBeanServerPluginServiceMBean.startMasterPluginContainer(), but this will not tell the master plugin container
to schedule any jobs yet. Usually this is only
called when the server itself is starting up and it wants to start the master PC but it has not yet
started the scheduler. In this case, after this method is called, the caller must ensure the scheduler is
started and then tell the master PC to schedule all its plugin jobs.startMasterPluginContainerWithoutSchedulingJobs in interface ServerPluginServiceMBeanServerPluginServiceMBean.startMasterPluginContainer()public MasterServerPluginContainer getMasterPluginContainer()
ServerPluginServiceMBeangetMasterPluginContainer in interface ServerPluginServiceMBeannull if not startedpublic boolean isStarted()
ServerPluginServiceMBeantrue if this service has been started. This does not necessarily mean the
master plugin container has be started - see ServerPluginServiceMBean.isMasterPluginContainerStarted() for that.isStarted in interface ServerPluginServiceMBeantrue if this service has been startedpublic boolean isMasterPluginContainerStarted()
ServerPluginServiceMBeantrue if the master plugin container has be started.
Note that this is not an indication if this service has started - see ServerPluginServiceMBean.isStarted() for that.
But, if the master plugin container has been started, then by definition this service has also been started.isMasterPluginContainerStarted in interface ServerPluginServiceMBeantrue if the master plugin container has been startedpublic File getServerPluginsDirectory()
ServerPluginServiceMBeangetServerPluginsDirectory in interface ServerPluginServiceMBeanprotected MasterServerPluginContainer createMasterPluginContainer()
This is protected to allow subclasses to override the PC that is created by this service (mainly to support tests).
Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.