Package org.netxms.client.datacollection
Class Threshold
- java.lang.Object
-
- org.netxms.client.datacollection.Threshold
-
public class Threshold extends Object
Represents data collection item's threshold
-
-
Field Summary
Fields Modifier and Type Field Description static intF_AVERAGEstatic intF_DEVIATIONstatic intF_DIFFstatic intF_ERRORstatic intF_LASTstatic intF_SCRIPTstatic intF_SUMstatic String[]FUNCTION_NAMESstatic intOP_EQstatic intOP_GTstatic intOP_GT_EQstatic intOP_LEstatic intOP_LE_EQstatic intOP_LIKEstatic intOP_NEstatic intOP_NOTLIKEstatic String[]OPERATION_NAMES
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfillMessage(org.netxms.base.NXCPMessage msg, long baseId)Fill NXCP message with threshold's data.SeveritygetCurrentSeverity()intgetFireEvent()intgetFunction()longgetId()DategetLastEventTimestamp()intgetOperation()intgetRearmEvent()intgetRepeatInterval()intgetSampleCount()StringgetScript()StringgetTextualRepresentation()Get textual representation of this thresholdStringgetValue()booleanisActive()Returns true if threshold is currently active (it's condition was evaluated to true at last poll).voidsetFireEvent(int fireEvent)voidsetFunction(int function)voidsetOperation(int operation)voidsetRearmEvent(int rearmEvent)voidsetRepeatInterval(int repeatInterval)voidsetSampleCount(int sampleCount)Set sample count for thresholdvoidsetScript(String script)voidsetValue(String value)
-
-
-
Field Detail
-
F_LAST
public static final int F_LAST
- See Also:
- Constant Field Values
-
F_AVERAGE
public static final int F_AVERAGE
- See Also:
- Constant Field Values
-
F_DEVIATION
public static final int F_DEVIATION
- See Also:
- Constant Field Values
-
F_DIFF
public static final int F_DIFF
- See Also:
- Constant Field Values
-
F_ERROR
public static final int F_ERROR
- See Also:
- Constant Field Values
-
F_SUM
public static final int F_SUM
- See Also:
- Constant Field Values
-
F_SCRIPT
public static final int F_SCRIPT
- See Also:
- Constant Field Values
-
OP_LE
public static final int OP_LE
- See Also:
- Constant Field Values
-
OP_LE_EQ
public static final int OP_LE_EQ
- See Also:
- Constant Field Values
-
OP_EQ
public static final int OP_EQ
- See Also:
- Constant Field Values
-
OP_GT_EQ
public static final int OP_GT_EQ
- See Also:
- Constant Field Values
-
OP_GT
public static final int OP_GT
- See Also:
- Constant Field Values
-
OP_NE
public static final int OP_NE
- See Also:
- Constant Field Values
-
OP_LIKE
public static final int OP_LIKE
- See Also:
- Constant Field Values
-
OP_NOTLIKE
public static final int OP_NOTLIKE
- See Also:
- Constant Field Values
-
FUNCTION_NAMES
public static final String[] FUNCTION_NAMES
-
OPERATION_NAMES
public static final String[] OPERATION_NAMES
-
-
Constructor Detail
-
Threshold
public Threshold(org.netxms.base.NXCPMessage msg, long baseId)Create DCI threshold object from NXCP message- Parameters:
msg- NXCP messagebaseId- Base variable ID for this threshold in message
-
Threshold
public Threshold()
Create new threshold object
-
Threshold
public Threshold(Threshold src)
Copy constructor (does not copy ID!)- Parameters:
src- source object
-
-
Method Detail
-
fillMessage
protected void fillMessage(org.netxms.base.NXCPMessage msg, long baseId)Fill NXCP message with threshold's data. Operational data maintained by server will not be put into message.- Parameters:
msg- NXCP messagebaseId- Base variable identifier
-
getFireEvent
public int getFireEvent()
- Returns:
- the fireEvent
-
setFireEvent
public void setFireEvent(int fireEvent)
- Parameters:
fireEvent- the fireEvent to set
-
getRearmEvent
public int getRearmEvent()
- Returns:
- the rearmEvent
-
setRearmEvent
public void setRearmEvent(int rearmEvent)
- Parameters:
rearmEvent- the rearmEvent to set
-
getSampleCount
public int getSampleCount()
- Returns:
- sample count
-
setSampleCount
public void setSampleCount(int sampleCount)
Set sample count for threshold- Parameters:
sampleCount- sample count
-
getFunction
public int getFunction()
- Returns:
- the function
-
setFunction
public void setFunction(int function)
- Parameters:
function- the function to set
-
getOperation
public int getOperation()
- Returns:
- the operation
-
setOperation
public void setOperation(int operation)
- Parameters:
operation- the operation to set
-
getRepeatInterval
public int getRepeatInterval()
- Returns:
- the repeatInterval
-
setRepeatInterval
public void setRepeatInterval(int repeatInterval)
- Parameters:
repeatInterval- the repeatInterval to set
-
getValue
public String getValue()
- Returns:
- the value
-
setValue
public void setValue(String value)
- Parameters:
value- the value to set
-
getId
public long getId()
- Returns:
- the id
-
isActive
public boolean isActive()
Returns true if threshold is currently active (it's condition was evaluated to true at last poll). This field cannot be set and is always false when threshold received as part of DCI configuration.- Returns:
- the active status
-
getCurrentSeverity
public Severity getCurrentSeverity()
- Returns:
- the currentSeverity
-
getLastEventTimestamp
public Date getLastEventTimestamp()
- Returns:
- the lastEventTimestamp
-
getScript
public String getScript()
- Returns:
- the script
-
setScript
public void setScript(String script)
- Parameters:
script- the script to set
-
getTextualRepresentation
public String getTextualRepresentation()
Get textual representation of this threshold- Returns:
- textual representation of this threshold
-
-