|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.pluginapi.plugin.PluginContext
public class PluginContext
A global context containing information about a plugin.
Constructor Summary | |
---|---|
PluginContext(String pluginName,
SystemInfo systemInfo,
File temporaryDirectory,
File dataDirectory,
String pluginContainerName)
Creates a new PluginContext object. |
Method Summary | |
---|---|
File |
getDataDirectory()
Directory where plugins can store persisted data that survives agent restarts. |
String |
getPluginContainerName()
The name of the plugin container in which the plugin is running. |
String |
getPluginName()
The name of the plugin which corresponds to this context object. |
SystemInfo |
getSystemInformation()
Returns a SystemInfo object that contains information about the platform/operating system that the
plugin is running on. |
File |
getTemporaryDirectory()
A temporary directory for plugin use that is destroyed at agent shutdown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PluginContext(String pluginName, SystemInfo systemInfo, File temporaryDirectory, File dataDirectory, String pluginContainerName)
PluginContext
object. The plugin container is responsible for instantiating these
objects; plugin writers should never have to actually create context objects.
pluginName
- the name of the plugin that corresponds to this contextsystemInfo
- information about the system on which the plugin and its plugin container are
runningtemporaryDirectory
- a temporary directory for plugin use that is destroyed at agent shutdowndataDirectory
- a directory where plugins can store persisted data that survives agent restartspluginContainerName
- the name of the plugin container in which the plugin is running.
You can be assured this name is unique across all plugin
containers/agents running in the RHQ environment.Method Detail |
---|
public String getPluginName()
public SystemInfo getSystemInformation()
SystemInfo
object that contains information about the platform/operating system that the
plugin is running on. With this object, you can natively obtain things such as the operating system name, its
hostname,and other things. Please refer to the javadoc on SystemInfo
for more details on the types of
information you can access.
public File getTemporaryDirectory()
File.createTempFile(String, String, File)
API when writing to
this directory.
public File getDataDirectory()
public String getPluginContainerName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |