com.dynatrace.diagnostics.pdk
Interface PluginEnvironment

All Known Subinterfaces:
ActionEnvironment, MonitorEnvironment, TaskEnvironment

public interface PluginEnvironment

The root interface in the Plugin environment interface hierarchy.

This interface specifies methods that can be used by all Plugins. The getConfig*(String property) methods return the configured value for the given property, where * stands for the property type.


Nested Class Summary
static interface PluginEnvironment.Host
          Represents a host.
 
Method Summary
 java.lang.Boolean getConfigBoolean(java.lang.String property)
          Returns the value of the specified Boolean property.
 java.util.Date getConfigDate(java.lang.String property)
          Returns the value of the specified Date property.
 java.lang.Double getConfigDouble(java.lang.String property)
          Returns the value of the specified Double property.
 java.io.File getConfigFile(java.lang.String property)
          Deprecated. no longer used, use String instead
 java.lang.Long getConfigLong(java.lang.String property)
          Returns the value of the specified Long property.
 java.lang.String getConfigPassword(java.lang.String property)
          Returns the value of the specified Password property.
 java.lang.String getConfigString(java.lang.String property)
          Returns the value of the specified String or List property.
 java.net.URL getConfigUrl(java.lang.String property)
          Returns the value of the specified URL property.
 PluginEnvironment.Host getHost()
          Returns the host configured for the Plugin.
 boolean isStopped()
          Returns whether the current execution should be stopped or not.
 

Method Detail

getConfigBoolean

java.lang.Boolean getConfigBoolean(java.lang.String property)
Returns the value of the specified Boolean property. Plugin properties are defined in the plugin.xml file.

Parameters:
property - the key of the property
Returns:
the Boolean object for the specified property or null if the property does not exist

getConfigDate

java.util.Date getConfigDate(java.lang.String property)
Returns the value of the specified Date property. Plugin properties are defined in the plugin.xml file.

Parameters:
property - the key of the property
Returns:
the Date object for the specified property or null if the property does not exist

getConfigDouble

java.lang.Double getConfigDouble(java.lang.String property)
Returns the value of the specified Double property. Plugin properties are defined in the plugin.xml file.

Parameters:
property - the key of the property
Returns:
the Double object for the specified property or null if the property does not exist

getConfigFile

@Deprecated
java.io.File getConfigFile(java.lang.String property)
Deprecated. no longer used, use String instead

Returns the value of the specified File property. Plugin properties are defined in the plugin.xml file.

Parameters:
property - the key of the property
Returns:
the File object for the specified property or null if the property does not exist

getConfigLong

java.lang.Long getConfigLong(java.lang.String property)
Returns the value of the specified Long property. Plugin properties are defined in the plugin.xml file.

Parameters:
property - the key of the property
Returns:
the Long object for the specified property or null if the property does not exist

getConfigString

java.lang.String getConfigString(java.lang.String property)
Returns the value of the specified String or List property. Plugin properties are defined in the plugin.xml file.

Parameters:
property - the key of the property
Returns:
the String object for the specified property or null if the property does not exist

getConfigPassword

java.lang.String getConfigPassword(java.lang.String property)
Returns the value of the specified Password property. Plugin properties are defined in the plugin.xml file.

Parameters:
property - the key of the property
Returns:
the String object for the specified property or null if the property does not exist

getHost

PluginEnvironment.Host getHost()
Returns the host configured for the Plugin. If multiple hosts are configured the Plugins execute method will be called repeatedly for each host. If the Plugin does not support hosts, this method will return null.

Returns:
the configured host, or null if hosts are not supported

getConfigUrl

java.net.URL getConfigUrl(java.lang.String property)
Returns the value of the specified URL property. Plugin properties are defined in the plugin.xml file.

Parameters:
property - the key of the property
Returns:
the URL object for the specified property or null if the property does not exist

isStopped

boolean isStopped()
Returns whether the current execution should be stopped or not.

If this method returns true, Plugin execution should be stopped as soon as possible. If the Plugin ignores this or fails to stop execution in a reasonable time frame, the execution thread will be stopped ungracefully which might lead to resource leaks.

Returns:
true if the execution should be stopped, else false


Copyright © 2004-2012 dynaTrace software GmbH