Package org.netxms.client.datacollection
Class Threshold
java.lang.Object
org.netxms.client.datacollection.Threshold
Represents data collection item's threshold
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final String[]static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final String[]
- 
Constructor SummaryConstructorsConstructorDescriptionCreate new threshold objectThreshold(NXCPMessage msg, long baseId) Create DCI threshold object from NXCP messageCopy constructor
- 
Method SummaryModifier and TypeMethodDescriptionDuplicate threshold for later use (do not copy ID for duplicated threshold)protected voidfillMessage(NXCPMessage msg, long baseId) Fill NXCP message with threshold's data.intintlonggetId()Get message from last event generated when this threshold was activated.Get timestamp of last event generated when this threshold was activated.intintintintGet textual representation of this thresholdgetValue()booleanisActive()Returns true if threshold is currently active (it's condition was evaluated to true at last poll).booleanvoidsetDisabled(boolean disabled) voidsetFireEvent(int fireEvent) voidsetFunction(int function) voidsetOperation(int operation) voidsetRearmEvent(int rearmEvent) voidsetRepeatInterval(int repeatInterval) voidsetSampleCount(int sampleCount) Set sample count for thresholdvoidvoid
- 
Field Details- 
F_LASTpublic static final int F_LAST- See Also:
 
- 
F_AVERAGEpublic static final int F_AVERAGE- See Also:
 
- 
F_MEAN_DEVIATIONpublic static final int F_MEAN_DEVIATION- See Also:
 
- 
F_DIFFpublic static final int F_DIFF- See Also:
 
- 
F_ERRORpublic static final int F_ERROR- See Also:
 
- 
F_SUMpublic static final int F_SUM- See Also:
 
- 
F_SCRIPTpublic static final int F_SCRIPT- See Also:
 
- 
F_ABS_DEVIATIONpublic static final int F_ABS_DEVIATION- See Also:
 
- 
F_ANOMALYpublic static final int F_ANOMALY- See Also:
 
- 
OP_LEpublic static final int OP_LE- See Also:
 
- 
OP_LE_EQpublic static final int OP_LE_EQ- See Also:
 
- 
OP_EQpublic static final int OP_EQ- See Also:
 
- 
OP_GT_EQpublic static final int OP_GT_EQ- See Also:
 
- 
OP_GTpublic static final int OP_GT- See Also:
 
- 
OP_NEpublic static final int OP_NE- See Also:
 
- 
OP_LIKEpublic static final int OP_LIKE- See Also:
 
- 
OP_NOTLIKEpublic static final int OP_NOTLIKE- See Also:
 
- 
OP_ILIKEpublic static final int OP_ILIKE- See Also:
 
- 
OP_INOTLIKEpublic static final int OP_INOTLIKE- See Also:
 
- 
FUNCTION_NAMES
- 
OPERATION_NAMES
 
- 
- 
Constructor Details- 
ThresholdCreate DCI threshold object from NXCP message- Parameters:
- msg- NXCP message
- baseId- Base variable ID for this threshold in message
 
- 
Thresholdpublic Threshold()Create new threshold object
- 
ThresholdCopy constructor- Parameters:
- src- source object
 
 
- 
- 
Method Details- 
fillMessageFill NXCP message with threshold's data. Operational data maintained by server will not be put into message.- Parameters:
- msg- NXCP message
- baseId- Base variable identifier
 
- 
getFireEventpublic int getFireEvent()- Returns:
- the fireEvent
 
- 
setFireEventpublic void setFireEvent(int fireEvent) - Parameters:
- fireEvent- the fireEvent to set
 
- 
getRearmEventpublic int getRearmEvent()- Returns:
- the rearmEvent
 
- 
setRearmEventpublic void setRearmEvent(int rearmEvent) - Parameters:
- rearmEvent- the rearmEvent to set
 
- 
getSampleCountpublic int getSampleCount()- Returns:
- sample count
 
- 
setSampleCountpublic void setSampleCount(int sampleCount) Set sample count for threshold- Parameters:
- sampleCount- sample count
 
- 
getFunctionpublic int getFunction()- Returns:
- the function
 
- 
setFunctionpublic void setFunction(int function) - Parameters:
- function- the function to set
 
- 
getOperationpublic int getOperation()- Returns:
- the operation
 
- 
setOperationpublic void setOperation(int operation) - Parameters:
- operation- the operation to set
 
- 
getRepeatIntervalpublic int getRepeatInterval()- Returns:
- the repeatInterval
 
- 
setRepeatIntervalpublic void setRepeatInterval(int repeatInterval) - Parameters:
- repeatInterval- the repeatInterval to set
 
- 
getValue- Returns:
- the value
 
- 
setValue- Parameters:
- value- the value to set
 
- 
getIdpublic long getId()- Returns:
- the id
 
- 
isActivepublic 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- Returns:
- the currentSeverity
 
- 
getLastEventTimestampGet timestamp of last event generated when this threshold was activated.- Returns:
- timestamp of last event generated when this threshold was activated or 0
 
- 
getLastEventMessageGet message from last event generated when this threshold was activated.- Returns:
- message from last event generated when this threshold was activated or null
 
- 
getScript- Returns:
- the script
 
- 
setScript- Parameters:
- script- the script to set
 
- 
isDisabledpublic boolean isDisabled()- Returns:
- the disabled
 
- 
setDisabledpublic void setDisabled(boolean disabled) - Parameters:
- disabled- the disabled to set
 
- 
getTextualRepresentationGet textual representation of this threshold- Returns:
- textual representation of this threshold
 
- 
duplicateDuplicate threshold for later use (do not copy ID for duplicated threshold)- Returns:
- threshold copy
 
 
-