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

All Known Implementing Classes:
PluginDeploymentScanner

public interface PluginDeploymentScannerMBean


Field Summary
static javax.management.ObjectName OBJECT_NAME
          The name this service will be registered as.
 
Method Summary
 java.io.File getAgentPluginDir()
          Gets the directory name where the agent plugin jars are located.
 java.io.File getLicenseFile()
           
 java.lang.Long getScanPeriod()
          Gets the amount of time (in milliseconds) between scans.
 java.io.File getServerPluginDir()
          Gets the directory name where the server plugin jars are located.
 java.io.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(java.io.File name)
          Sets the directory where the agent plugin jars are located.
 void setLicenseFile(java.io.File name)
           
 void setScanPeriod(java.lang.Long ms)
          Sets the amount of time (in milliseconds) between scans.
 void setServerPluginDir(java.io.File name)
          Sets the directory where the server plugin jars are located.
 void setUserPluginDir(java.io.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 javax.management.ObjectName OBJECT_NAME
The name this service will be registered as.

Method Detail

start

void start()
           throws java.lang.Exception
Throws:
java.lang.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 java.lang.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:
java.lang.Exception
See Also:
scanAndRegister()

scanAndRegister

void scanAndRegister()
                     throws java.lang.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:
java.lang.Exception

setScanPeriod

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

Parameters:
ms - time in millis between each scans

getScanPeriod

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

Returns:
the time in millis between each scans

setUserPluginDir

void setUserPluginDir(java.io.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

java.io.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(java.io.File name)
Sets the directory where the server plugin jars are located.

Parameters:
name - the name of the server plugins dir

getServerPluginDir

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

Returns:
server plugin directory name

setAgentPluginDir

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

Parameters:
name - the name of the agent plugins dir

getAgentPluginDir

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

Returns:
agent plugin directory name

setLicenseFile

void setLicenseFile(java.io.File name)

getLicenseFile

java.io.File getLicenseFile()


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