public class XmlAlertConfigurationParser extends Object implements AlertConfigurationParser
The alert configurations are read from an XML file. For example, the following alert.xml file specifies a CPU Utilization alert configuration, which is enabled, and has three configuration properties.
 
 <alerts>
     <alert
         class="org.openspaces.admin.alert.config.CpuUtilizationAlertConfiguration"
         enabled="true">
         <property key="high-threshold-perc" value="80" />
         <property key="low-threshold-perc" value="60" />
         <property key="measurement-period-milliseconds" value="60000" />
     </alert>
     <alert ...>
          ...
     </alert>
 </alerts>
 
 
 The alert XML configuration file can be located using a direct path to the file, or by reference to a resource located in the classpath. The default classpath config directory is "config/alerts/" and the default alert XML configuration file name is "alerts.xml".
| Modifier and Type | Field and Description | 
|---|---|
static String | 
DEFAULT_ALERT_CONFIG_DIRECTORY
default alert classpath relative configuration directory 
 | 
static String | 
DEFAULT_ALERT_RESOURCE_NAME
default alert configuration file name 
 | 
| Constructor and Description | 
|---|
XmlAlertConfigurationParser()  | 
XmlAlertConfigurationParser(String resourceName)  | 
| Modifier and Type | Method and Description | 
|---|---|
AlertConfiguration[] | 
parse()
Parse and return an array of  
AlertConfiguration. | 
public static final String DEFAULT_ALERT_CONFIG_DIRECTORY
public static final String DEFAULT_ALERT_RESOURCE_NAME
public XmlAlertConfigurationParser()
                            throws AlertConfigurationParserException
public XmlAlertConfigurationParser(String resourceName) throws AlertConfigurationParserException
public AlertConfiguration[] parse() throws AlertConfigurationParserException
AlertConfigurationParserAlertConfiguration. 
BeanConfig.getProperties() - String key-value properties used to configure the
 alert.AlertConfiguration.isEnabled() - enable the configuration for this
 alert.BeanConfig.getBeanClassName() - the server-side alert
 trigger class name.parse in interface AlertConfigurationParserAlertConfigurations.AlertConfigurationParserException - if failed to parse.Copyright © GigaSpaces.