org.rhq.enterprise.server.core.plugin
Interface PluginDeploymentScannerMBean

All Known Implementing Classes:
PluginDeploymentScanner

public interface PluginDeploymentScannerMBean


Field Summary
static ObjectName OBJECT_NAME
          The name this service will be registered as.
 
Method Summary
 File getAgentPluginDir()
          Gets the directory name where the agent plugin jars are located.
 Long getScanPeriod()
          Gets the amount of time (in milliseconds) between scans.
 File getServerPluginDir()
          Gets the directory name where the server plugin jars are located.
 File getUserPluginDir()
          Gets the directory name where the user can place agent or server plugin jars.
 void scan()
          This will scan the database for new/updated plugins and if it finds any, will write the content as plugin files in the file system.
 void scanAndRegister()
          This will scan the database for new/updated plugins and if it finds any, will write the content as plugin files in the file system.
 void setAgentPluginDir(File name)
          Sets the directory where the agent plugin jars are located.
 void setScanPeriod(Long ms)
          Sets the amount of time (in milliseconds) between scans.
 void setServerPluginDir(File name)
          Sets the directory where the server plugin jars are located.
 void setUserPluginDir(File name)
          Sets the directory where the user can place agent or server plugin jars.
 void start()
           
 void startDeployment()
          This is called separately from the start/stop lifecycle methods.
 void stop()
           
 

Field Detail

OBJECT_NAME

static final ObjectName OBJECT_NAME
The name this service will be registered as.

Method Detail

start

void start()
           throws Exception
Throws:
Exception

stop

void stop()

startDeployment

void startDeployment()
This is called separately from the start/stop lifecycle methods. It should only be called when we know the EJB/SLSB layer is fully initialized and ready to accept requests.


scan

void scan()
          throws Exception
This will scan the database for new/updated plugins and if it finds any, will write the content as plugin files in the file system. This will also delete old, obsolete plugins.

Throws:
Exception
See Also:
scanAndRegister()

scanAndRegister

void scanAndRegister()
                     throws Exception
This will scan the database for new/updated plugins and if it finds any, will write the content as plugin files in the file system. This will also delete old, obsolete plugins. Once finished, this will register agent plugins and update the database as appropriate.

Throws:
Exception

setScanPeriod

void setScanPeriod(Long ms)
Sets the amount of time (in milliseconds) between scans.

Parameters:
ms - time in millis between each scans

getScanPeriod

Long getScanPeriod()
Gets the amount of time (in milliseconds) between scans.

Returns:
the time in millis between each scans

setUserPluginDir

void setUserPluginDir(File name)
Sets the directory where the user can place agent or server plugin jars. The scanner will move plugins found here to their appropriate internal locations based on the kind of plugins it finds.

Parameters:
name - the name of the plugins dir where the user can copy plugins

getUserPluginDir

File getUserPluginDir()
Gets the directory name where the user can place agent or server plugin jars. If null, do not look for any user plugins.

Returns:
plugin directory name where the user puts plugins

setServerPluginDir

void setServerPluginDir(File name)
Sets the directory where the server plugin jars are located.

Parameters:
name - the name of the server plugins dir

getServerPluginDir

File getServerPluginDir()
Gets the directory name where the server plugin jars are located.

Returns:
server plugin directory name

setAgentPluginDir

void setAgentPluginDir(File name)
Sets the directory where the agent plugin jars are located.

Parameters:
name - the name of the agent plugins dir

getAgentPluginDir

File getAgentPluginDir()
Gets the directory name where the agent plugin jars are located.

Returns:
agent plugin directory name


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