org.opennms.netmgt.config.threshd
Class Basethresholddef

java.lang.Object
  extended by org.opennms.netmgt.config.threshd.Basethresholddef
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Expression, Threshold

public abstract class Basethresholddef
extends Object
implements Serializable

Class Basethresholddef.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
Basethresholddef()
           
 
Method Summary
 void addResourceFilter(int index, ResourceFilter vResourceFilter)
           
 void addResourceFilter(ResourceFilter vResourceFilter)
           
 void deleteRearm()
           
 void deleteTrigger()
           
 void deleteValue()
           
 Enumeration<ResourceFilter> enumerateResourceFilter()
          Method enumerateResourceFilter.
 String getDsLabel()
          Returns the value of field 'dsLabel'.
 String getDsType()
          Returns the value of field 'dsType'.
 double getRearm()
          Returns the value of field 'rearm'.
 String getRearmedUEI()
          Returns the value of field 'rearmedUEI'.
 ResourceFilter[] getResourceFilter()
          Method getResourceFilter.Returns the contents of the collection in an Array.
 ResourceFilter getResourceFilter(int index)
          Method getResourceFilter.
 List<ResourceFilter> getResourceFilterCollection()
          Method getResourceFilterCollection.Returns a reference to '_resourceFilterList'.
 int getResourceFilterCount()
          Method getResourceFilterCount.
 int getTrigger()
          Returns the value of field 'trigger'.
 String getTriggeredUEI()
          Returns the value of field 'triggeredUEI'.
 String getType()
          Returns the value of field 'type'.
 double getValue()
          Returns the value of field 'value'.
 boolean hasRearm()
          Method hasRearm.
 boolean hasTrigger()
          Method hasTrigger.
 boolean hasValue()
          Method hasValue.
 boolean isValid()
          Method isValid.
 Iterator<ResourceFilter> iterateResourceFilter()
          Method iterateResourceFilter.
 void removeAllResourceFilter()
           
 boolean removeResourceFilter(ResourceFilter vResourceFilter)
          Method removeResourceFilter.
 ResourceFilter removeResourceFilterAt(int index)
          Method removeResourceFilterAt.
 void setDsLabel(String dsLabel)
          Sets the value of field 'dsLabel'.
 void setDsType(String dsType)
          Sets the value of field 'dsType'.
 void setRearm(double rearm)
          Sets the value of field 'rearm'.
 void setRearmedUEI(String rearmedUEI)
          Sets the value of field 'rearmedUEI'.
 void setResourceFilter(int index, ResourceFilter vResourceFilter)
           
 void setResourceFilter(List<ResourceFilter> vResourceFilterList)
          Sets the value of '_resourceFilterList' by copying the given Vector.
 void setResourceFilter(ResourceFilter[] vResourceFilterArray)
           
 void setResourceFilterCollection(List<ResourceFilter> resourceFilterList)
          Deprecated.  
 void setTrigger(int trigger)
          Sets the value of field 'trigger'.
 void setTriggeredUEI(String triggeredUEI)
          Sets the value of field 'triggeredUEI'.
 void setType(String type)
          Sets the value of field 'type'.
 void setValue(double value)
          Sets the value of field 'value'.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Basethresholddef

public Basethresholddef()
Method Detail

addResourceFilter

public void addResourceFilter(ResourceFilter vResourceFilter)
                       throws IndexOutOfBoundsException
Parameters:
vResourceFilter -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addResourceFilter

public void addResourceFilter(int index,
                              ResourceFilter vResourceFilter)
                       throws IndexOutOfBoundsException
Parameters:
index -
vResourceFilter -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

deleteRearm

public void deleteRearm()

deleteTrigger

public void deleteTrigger()

deleteValue

public void deleteValue()

enumerateResourceFilter

public Enumeration<ResourceFilter> enumerateResourceFilter()
Method enumerateResourceFilter.

Returns:
an Enumeration over all possible elements of this collection

getDsLabel

public String getDsLabel()
Returns the value of field 'dsLabel'. The field 'dsLabel' has the following description: Value to retrieve from strings.properties to label this datasource.

Returns:
the value of field 'DsLabel'.

getDsType

public String getDsType()
Returns the value of field 'dsType'. The field 'dsType' has the following description: RRD datasource type. "node" indicates a node level datasource. "if" indicates an interface level datasource.

Returns:
the value of field 'DsType'.

getRearm

public double getRearm()
Returns the value of field 'rearm'. The field 'rearm' has the following description: Rearm value. Identifies the value that the datasource must fall below, in the case of a "high" threshold or rise above, in the case of a "low" threshold, before the threshold will rearm, and once again be eligible to generate an event.

Returns:
the value of field 'Rearm'.

getRearmedUEI

public String getRearmedUEI()
Returns the value of field 'rearmedUEI'. The field 'rearmedUEI' has the following description: The UEI to send when this threshold is re-armed. If not specified, defaults to standard threshold UEIs

Returns:
the value of field 'RearmedUEI'.

getResourceFilter

public ResourceFilter getResourceFilter(int index)
                                 throws IndexOutOfBoundsException
Method getResourceFilter.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.threshd.ResourceFilter at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getResourceFilter

public ResourceFilter[] getResourceFilter()
Method getResourceFilter.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getResourceFilterCollection

public List<ResourceFilter> getResourceFilterCollection()
Method getResourceFilterCollection.Returns a reference to '_resourceFilterList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getResourceFilterCount

public int getResourceFilterCount()
Method getResourceFilterCount.

Returns:
the size of this collection

getTrigger

public int getTrigger()
Returns the value of field 'trigger'. The field 'trigger' has the following description: Trigger value. Identifies the number of consecutive polls that the datasource value must exceed the defined threshold value before a threshold event is generated.

Returns:
the value of field 'Trigger'.

getTriggeredUEI

public String getTriggeredUEI()
Returns the value of field 'triggeredUEI'. The field 'triggeredUEI' has the following description: The UEI to send when this threshold is triggered. If not specified, defaults to standard threshold UEIs

Returns:
the value of field 'TriggeredUEI'.

getType

public String getType()
Returns the value of field 'type'. The field 'type' has the following description: Threshold type. If "high", a 'highThresholdExceeded' event will be generated. If "low", a 'lowThresholdExceeded' event.

Returns:
the value of field 'Type'.

getValue

public double getValue()
Returns the value of field 'value'. The field 'value' has the following description: Threshold value. If the datasource value rises above this value, in the case of a "high" threshold, or drops below this value, in the case of a "low" threshold the threshold is considered to have been exceeded and the exceeded count will be incremented. Any time that the datasource value drops below this value, in the case of a "high" threshold, or rises above this value, in the case of a "low" threshold the exceeded count is reset back to zero. Whenever the exceeded count reaches the trigger value then a threshold event is generated.

Returns:
the value of field 'Value'.

hasRearm

public boolean hasRearm()
Method hasRearm.

Returns:
true if at least one Rearm has been added

hasTrigger

public boolean hasTrigger()
Method hasTrigger.

Returns:
true if at least one Trigger has been added

hasValue

public boolean hasValue()
Method hasValue.

Returns:
true if at least one Value has been added

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateResourceFilter

public Iterator<ResourceFilter> iterateResourceFilter()
Method iterateResourceFilter.

Returns:
an Iterator over all possible elements in this collection

removeAllResourceFilter

public void removeAllResourceFilter()

removeResourceFilter

public boolean removeResourceFilter(ResourceFilter vResourceFilter)
Method removeResourceFilter.

Parameters:
vResourceFilter -
Returns:
true if the object was removed from the collection.

removeResourceFilterAt

public ResourceFilter removeResourceFilterAt(int index)
Method removeResourceFilterAt.

Parameters:
index -
Returns:
the element removed from the collection

setDsLabel

public void setDsLabel(String dsLabel)
Sets the value of field 'dsLabel'. The field 'dsLabel' has the following description: Value to retrieve from strings.properties to label this datasource.

Parameters:
dsLabel - the value of field 'dsLabel'.

setDsType

public void setDsType(String dsType)
Sets the value of field 'dsType'. The field 'dsType' has the following description: RRD datasource type. "node" indicates a node level datasource. "if" indicates an interface level datasource.

Parameters:
dsType - the value of field 'dsType'.

setRearm

public void setRearm(double rearm)
Sets the value of field 'rearm'. The field 'rearm' has the following description: Rearm value. Identifies the value that the datasource must fall below, in the case of a "high" threshold or rise above, in the case of a "low" threshold, before the threshold will rearm, and once again be eligible to generate an event.

Parameters:
rearm - the value of field 'rearm'.

setRearmedUEI

public void setRearmedUEI(String rearmedUEI)
Sets the value of field 'rearmedUEI'. The field 'rearmedUEI' has the following description: The UEI to send when this threshold is re-armed. If not specified, defaults to standard threshold UEIs

Parameters:
rearmedUEI - the value of field 'rearmedUEI'.

setResourceFilter

public void setResourceFilter(int index,
                              ResourceFilter vResourceFilter)
                       throws IndexOutOfBoundsException
Parameters:
index -
vResourceFilter -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setResourceFilter

public void setResourceFilter(ResourceFilter[] vResourceFilterArray)
Parameters:
vResourceFilterArray -

setResourceFilter

public void setResourceFilter(List<ResourceFilter> vResourceFilterList)
Sets the value of '_resourceFilterList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vResourceFilterList - the Vector to copy.

setResourceFilterCollection

public void setResourceFilterCollection(List<ResourceFilter> resourceFilterList)
Deprecated. 

Sets the value of '_resourceFilterList' by setting it to the given Vector. No type checking is performed.

Parameters:
resourceFilterList - the Vector to set.

setTrigger

public void setTrigger(int trigger)
Sets the value of field 'trigger'. The field 'trigger' has the following description: Trigger value. Identifies the number of consecutive polls that the datasource value must exceed the defined threshold value before a threshold event is generated.

Parameters:
trigger - the value of field 'trigger'.

setTriggeredUEI

public void setTriggeredUEI(String triggeredUEI)
Sets the value of field 'triggeredUEI'. The field 'triggeredUEI' has the following description: The UEI to send when this threshold is triggered. If not specified, defaults to standard threshold UEIs

Parameters:
triggeredUEI - the value of field 'triggeredUEI'.

setType

public void setType(String type)
Sets the value of field 'type'. The field 'type' has the following description: Threshold type. If "high", a 'highThresholdExceeded' event will be generated. If "low", a 'lowThresholdExceeded' event.

Parameters:
type - the value of field 'type'.

setValue

public void setValue(double value)
Sets the value of field 'value'. The field 'value' has the following description: Threshold value. If the datasource value rises above this value, in the case of a "high" threshold, or drops below this value, in the case of a "low" threshold the threshold is considered to have been exceeded and the exceeded count will be incremented. Any time that the datasource value drops below this value, in the case of a "high" threshold, or rises above this value, in the case of a "low" threshold the exceeded count is reset back to zero. Whenever the exceeded count reaches the trigger value then a threshold event is generated.

Parameters:
value - the value of field 'value'.

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright © 2008. All Rights Reserved.