public class ServerPluginContext extends Object
| Constructor and Description |
|---|
ServerPluginContext(ServerPluginEnvironment env,
File dataDirectory,
File tmpDirectory,
org.rhq.core.domain.configuration.Configuration pluginConfiguration,
List<ScheduledJobDefinition> schedules)
Creates a new
ServerPluginContext object. |
| Modifier and Type | Method and Description |
|---|---|
File |
getDataDirectory()
Directory where plugins can store persisted data that survives agent restarts.
|
org.rhq.core.domain.configuration.Configuration |
getPluginConfiguration()
Returns the configuration for the plugin itself.
|
ServerPluginEnvironment |
getPluginEnvironment()
The environment of the plugin, including its name and other information.
|
List<ScheduledJobDefinition> |
getSchedules()
The schedules in which the plugin component should be periodically invoked.
|
File |
getTemporaryDirectory()
A temporary directory for plugin use.
|
public ServerPluginContext(ServerPluginEnvironment env, File dataDirectory, File tmpDirectory, org.rhq.core.domain.configuration.Configuration pluginConfiguration, List<ScheduledJobDefinition> schedules)
ServerPluginContext object. The plugin container is responsible for instantiating these
objects; plugin writers should never have to actually create context objects.env - the environment of the plugin - includes the plugin name and other infodataDirectory - a directory where plugins can store persisted data that survives server restartstmpDirectory - a temporary directory for plugin usepluginConfiguration - the configuration for the plugin itselfschedules - if not null, the plugin will be invoked periodically via these schedulespublic ServerPluginEnvironment getPluginEnvironment()
public File getTemporaryDirectory()
File.createTempFile(String, String, File) API when writing to
this directory.public File getDataDirectory()
public org.rhq.core.domain.configuration.Configuration getPluginConfiguration()
null if the plugin did not
define configuration metadata in its plugin descriptor.null)public List<ScheduledJobDefinition> getSchedules()
null if the plugin should not be scheduledCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.