org.netxms.client.datacollection
Class Threshold

java.lang.Object
  extended by org.netxms.client.datacollection.Threshold

public class Threshold
extends java.lang.Object

Represents data collection item's threshold


Field Summary
static int F_AVERAGE
           
static int F_DEVIATION
           
static int F_DIFF
           
static int F_ERROR
           
static int F_LAST
           
static int F_SUM
           
static int OP_EQ
           
static int OP_GT
           
static int OP_GT_EQ
           
static int OP_LE
           
static int OP_LE_EQ
           
static int OP_LIKE
           
static int OP_NE
           
static int OP_NOTLIKE
           
 
Constructor Summary
Threshold()
          Create new threshold object
Threshold(NXCPMessage msg, long baseId)
          Create DCI threshold object from NXCP message
Threshold(Threshold src)
          Copy constructor
 
Method Summary
protected  void fillMessage(NXCPMessage msg, long baseId)
          Fill NXCP message with threshold's data.
 int getArg1()
           
 int getArg2()
           
 int getCurrentSeverity()
           
 int getFireEvent()
           
 int getFunction()
           
 long getId()
           
 java.util.Date getLastEventTimestamp()
           
 int getOperation()
           
 int getRearmEvent()
           
 int getRepeatInterval()
           
 java.lang.String getValue()
           
 boolean isActive()
          Returns true if threshold is currently active (it's condition was evaluated to true at last poll).
 void setArg1(int arg1)
           
 void setArg2(int arg2)
           
 void setFireEvent(int fireEvent)
           
 void setFunction(int function)
           
 void setOperation(int operation)
           
 void setRearmEvent(int rearmEvent)
           
 void setRepeatInterval(int repeatInterval)
           
 void setValue(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

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
Constructor Detail

Threshold

public Threshold(NXCPMessage msg,
                 long baseId)
Create DCI threshold object from NXCP message

Parameters:
msg - NXCP message
baseId - Base variable ID for this threshold in message

Threshold

public Threshold()
Create new threshold object


Threshold

public Threshold(Threshold src)
Copy constructor

Parameters:
src - source object
Method Detail

fillMessage

protected void fillMessage(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 message
baseId - 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

getArg1

public int getArg1()
Returns:
the arg1

setArg1

public void setArg1(int arg1)
Parameters:
arg1 - the arg1 to set

getArg2

public int getArg2()
Returns:
the arg2

setArg2

public void setArg2(int arg2)
Parameters:
arg2 - the arg2 to set

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 java.lang.String getValue()
Returns:
the value

setValue

public void setValue(java.lang.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 int getCurrentSeverity()
Returns:
the currentSeverity

getLastEventTimestamp

public java.util.Date getLastEventTimestamp()
Returns:
the lastEventTimestamp


Copyright © 2013. All Rights Reserved.