| 
GigaSpaces XAP 9.5 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openspaces.admin.alert.config.parser.XmlAlertConfigurationParser
public class XmlAlertConfigurationParser
A simple XML alert configuration parser.
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".
| Field Summary | |
|---|---|
static String | 
DEFAULT_ALERT_CONFIG_DIRECTORY
default alert classpath relative configuration directory  | 
static String | 
DEFAULT_ALERT_RESOURCE_NAME
default alert configuration file name  | 
| Constructor Summary | |
|---|---|
XmlAlertConfigurationParser()
 | 
|
XmlAlertConfigurationParser(String resourceName)
 | 
|
| Method Summary | |
|---|---|
 AlertConfiguration[] | 
parse()
Parse and return an array of AlertConfiguration. | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String DEFAULT_ALERT_CONFIG_DIRECTORY
public static final String DEFAULT_ALERT_RESOURCE_NAME
| Constructor Detail | 
|---|
public XmlAlertConfigurationParser()
                            throws AlertConfigurationParserException
AlertConfigurationParserException
public XmlAlertConfigurationParser(String resourceName)
                            throws AlertConfigurationParserException
AlertConfigurationParserException| Method Detail | 
|---|
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.
  | 
GigaSpaces XAP 9.5 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||