org.rhq.enterprise.server.plugin.pc
Interface ServerPluginServiceManagement

All Known Implementing Classes:
ServerPluginService

public interface ServerPluginServiceManagement

The MBean management interface that defines the lifecycle methods for the ServerPluginService service. This essentially is the server that starts and stops the master plugin container that manages all server-side plugins.

Author:
John Mazzitelli

Field Summary
static ObjectName OBJECT_NAME
           
static String OBJECT_NAME_STR
           
 
Method Summary
 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 stopMasterPluginContainer() and then a 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 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.
 

Field Detail

OBJECT_NAME_STR

static final String OBJECT_NAME_STR
See Also:
Constant Field Values

OBJECT_NAME

static final ObjectName OBJECT_NAME
Method Detail

start

void start()
Starts the service but will not start the master plugin container. After the server fully initializes, it should only then start the master server-side plugin container.


stop

void stop()
Shuts down this service along with the master plugin container.


startMasterPluginContainer

void startMasterPluginContainer()
Starts the master 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.

See Also:
startMasterPluginContainerWithoutSchedulingJobs()

stopMasterPluginContainer

void stopMasterPluginContainer()
Stops the master plugin container which will shuts down all plugins. If the master plugin container is already shutdown, this does nothing and returns.


restartMasterPluginContainer

void restartMasterPluginContainer()
Convienence method that first does a stopMasterPluginContainer() and then a startMasterPluginContainer().


startMasterPluginContainerWithoutSchedulingJobs

void startMasterPluginContainerWithoutSchedulingJobs()
Similar to 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.

See Also:
startMasterPluginContainer()

getMasterPluginContainer

MasterServerPluginContainer getMasterPluginContainer()
Returns the master server plugin container that will be responsible for managing all plugins of all types and their classloaders.

Returns:
the master plugin container, if started. Will be null if not started

isStarted

boolean isStarted()
Returns true if this service has been started. This does not necessarily mean the master plugin container has be started - see isMasterPluginContainerStarted() for that.

Returns:
true if this service has been started

isMasterPluginContainerStarted

boolean isMasterPluginContainerStarted()
Returns true if the master plugin container has be started. Note that this is not an indication if this service has started - see isStarted() for that. But, if the master plugin container has been started, then by definition this service has also been started.

Returns:
true if the master plugin container has been started

getServerPluginsDirectory

File getServerPluginsDirectory()
Returns the directory where the server plugins are found.

Returns:
server plugins directory


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.