com.tivoli.twg.monitor.api
Class TWGMonThreshold

java.lang.Object
  extended bycom.tivoli.twg.monitor.api.TWGMonThreshold

public class TWGMonThreshold
extends java.lang.Object

This is the TWGMonThreshold class. This class is used in the monitor API.


Field Summary
static byte CHANGED_THRESHOLD
           
static byte ENUMERATED_THRESHOLD
           
static byte ERROR_THRESHOLD
           
static byte HIGH_ERROR_THRESHOLD
           
static byte HIGH_WARNING_THRESHOLD
           
static byte INVALID_STATE_THRESHOLD
           
static byte INVALID_THRESHOLD
           
static byte LOW_ERROR_THRESHOLD
           
static byte LOW_WARNING_THRESHOLD
           
static byte NORMAL_THRESHOLD
           
static byte NUMERIC_THRESHOLD
           
static byte STRING_THRESHOLD
           
static byte WARNING_THRESHOLD
           
 
Constructor Summary
TWGMonThreshold()
          This is the constructor for manually building the Threshold for the GUI or SDK
 
Method Summary
 byte getChangeBasedSeverity()
          Gets the monoitor based severity selection that should be associated with threshold events generated for this threshold if change based.
 byte getDataType()
          returns a flag byte indicating the type of threshold this threshold represents (String, numeric, etc.) jret byte with flags indicating the type of threshold this object represents
 java.lang.String getDescription()
          returns a string that the user specified when the threshold was created.
 TWGMonPath getDispPath()
          returns the information that describes the path that is being thresholded in a form that is appropriate for display on a console
 java.util.Locale getDispPathLocale()
          returns the locale that was specified for the displayable strings when this threshold was created
 TWGMonDoubleThresholdData getDoubleData()
          returns the numeric threshold object from a numeric type threshold
 TWGMonThresholdId getID()
          Returns the object that holds the identification information for objects of this class.
 java.lang.String getName()
          returns a string that provides a name for the threshold.
 TWGMonPath getProgPath()
          returns the information that describes the path that is being thresholded in a form that is appropriate for programatic decisions
 int getQueueDepth()
          gets a numeric value that indicates how many events will be queued for this threshold while the server is not available.
 int getResendDelay()
          gets a numeric value that indicates how long a condition must continue to exist after an initial threshold event is generated before another event is generated signaling that the condition continues to exist
 int getSendDelay()
          gets a numeric value that indicates how long a condition must first exist before an initial threshold event is generated
 TWGMonStringThresholdData getStringData()
          returns the string threshold object from a string type threshold
 int getTargetGroupID()
          returns an int that contains the filter group object ID that this threshold was established for.
 long getTargetSystemID()
          returns an int that contains the managed object ID that this threshold was established for.
 boolean isAcceptable()
          returns indication if the data in the object would be acceptable to the server
 boolean isChangeBased()
          Gets whether this threshold should generate events on changes
 boolean isEnabled()
          returns the status of the threshold with reguard to generating events
 boolean isEnumerated()
          returns the status of the threshold with reguard to enumerated values
 boolean isNewThreshold()
          Gets whether this object contains a thresholdId from the server
 boolean isValid()
          Gets whether this object contains valid data.
 void setChangeBased(boolean changeType)
          provides an interface to indicate whether the threshold should generate events on changes rather than comparison against set values
 void setChangeBased(boolean changeType, byte monSeverity)
          provides an interface to indicate whether the threshold should generate events on changes rather than comparison against set values
 void setDescription(java.lang.String parm)
          provides a method to set the descriptive text that accompanies the threshold
 void setDisplayablePath(TWGMonPath path, java.util.Locale locale)
          method to set the displayable version of the attribute path to threshold
 void setDoubleData(TWGMonDoubleThresholdData data)
          Provides an interface to set the Double Threshold data object
 void setEnabled(boolean enable)
          provides an interface to indicate whether the threshold should be enabled to generate events or not
 void setEnumerated(boolean enumerated)
          provides an interface to indicate whether the threshold has enumeration data on the server
 void setLocale(java.util.Locale parm)
          provides a method to set the Locale that the threshold information refers to
 void setName(java.lang.String parm)
          provides a method to set the threshold name
 void setProgramaticPath(TWGMonPath path)
          method to set the programmatic version of the attribute path to threshold
 void setQueueDepth(int parm)
          provides a method to set the event queue depth for this threshold.
 void setResendDelay(int parm)
          the between resends of event for a threshold setting
 void setSendDelay(int parm)
          provides a method to set the time the threshold condition must continuously exist before event is generated
 void setStringData(TWGMonStringThresholdData data)
          Provides an interface to set the String Threshold data object
 void setTargetGroupID(int parm)
          used to set the id for the group filter object that specifies which systems this threshold applies to.
 void setTargetSystemID(long parm)
          used to set the id for the managed object that specifies which system this threshold applies to.
 void setThreshId(TWGMonThresholdId parm)
          provides a method to set the thresholdId object in this object
 java.lang.String toString()
          returns a string string for debuging that contains in readable text the current state of the object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INVALID_THRESHOLD

public static final byte INVALID_THRESHOLD
See Also:
Constant Field Values

NUMERIC_THRESHOLD

public static final byte NUMERIC_THRESHOLD
See Also:
Constant Field Values

STRING_THRESHOLD

public static final byte STRING_THRESHOLD
See Also:
Constant Field Values

ENUMERATED_THRESHOLD

public static final byte ENUMERATED_THRESHOLD
See Also:
Constant Field Values

INVALID_STATE_THRESHOLD

public static final byte INVALID_STATE_THRESHOLD
See Also:
Constant Field Values

HIGH_ERROR_THRESHOLD

public static final byte HIGH_ERROR_THRESHOLD
See Also:
Constant Field Values

LOW_ERROR_THRESHOLD

public static final byte LOW_ERROR_THRESHOLD
See Also:
Constant Field Values

ERROR_THRESHOLD

public static final byte ERROR_THRESHOLD
See Also:
Constant Field Values

HIGH_WARNING_THRESHOLD

public static final byte HIGH_WARNING_THRESHOLD
See Also:
Constant Field Values

LOW_WARNING_THRESHOLD

public static final byte LOW_WARNING_THRESHOLD
See Also:
Constant Field Values

WARNING_THRESHOLD

public static final byte WARNING_THRESHOLD
See Also:
Constant Field Values

NORMAL_THRESHOLD

public static final byte NORMAL_THRESHOLD
See Also:
Constant Field Values

CHANGED_THRESHOLD

public static final byte CHANGED_THRESHOLD
See Also:
Constant Field Values
Constructor Detail

TWGMonThreshold

public TWGMonThreshold()
This is the constructor for manually building the Threshold for the GUI or SDK

Method Detail

setDoubleData

public void setDoubleData(TWGMonDoubleThresholdData data)
Provides an interface to set the Double Threshold data object

Parameters:
data - threshold data information object to set

setStringData

public void setStringData(TWGMonStringThresholdData data)
Provides an interface to set the String Threshold data object

Parameters:
data - threshold data information object to set

setEnabled

public void setEnabled(boolean enable)
provides an interface to indicate whether the threshold should be enabled to generate events or not

Parameters:
enable - indicates whether events are desired from this threshold

setEnumerated

public void setEnumerated(boolean enumerated)
provides an interface to indicate whether the threshold has enumeration data on the server

Parameters:
enumerated - indicates whether the threshold has enumeration data on the server

setChangeBased

public void setChangeBased(boolean changeType)
provides an interface to indicate whether the threshold should generate events on changes rather than comparison against set values

Parameters:
changeType - indicates whether change based events are desired from this threshold

setChangeBased

public void setChangeBased(boolean changeType,
                           byte monSeverity)
provides an interface to indicate whether the threshold should generate events on changes rather than comparison against set values

Parameters:
changeType - indicates whether change based events are desired from this threshold
monSeverity - indicates what monitor severity to associate with events generated for change based thresholds
See Also:
WARNING_THRESHOLD, ERROR_THRESHOLD, NORMAL_THRESHOLD

setTargetGroupID

public void setTargetGroupID(int parm)
used to set the id for the group filter object that specifies which systems this threshold applies to. If this value is not set the threshold defaults to being applied to a single system

Parameters:
parm - id of the group filter that this threshold applies to

setTargetSystemID

public void setTargetSystemID(long parm)
used to set the id for the managed object that specifies which system this threshold applies to.

Parameters:
parm - id of the system that this threshold applies to

setResendDelay

public void setResendDelay(int parm)
the between resends of event for a threshold setting

Parameters:
parm - time in seconds between resends. 0 = send only once per entry to state

setSendDelay

public void setSendDelay(int parm)
provides a method to set the time the threshold condition must continuously exist before event is generated

Parameters:
parm - time in seconds event must exist. 0 = send immediately

setQueueDepth

public void setQueueDepth(int parm)
provides a method to set the event queue depth for this threshold. Some agents support queuing events when the server is not available. This setting controls the maximum number of events that will be held while the server is not available. When this number is exceeded the oldest event in the queue is lost. The value must be a positive number.

Parameters:
parm - queue depth. 0 = no queuing for the threshold

setLocale

public void setLocale(java.util.Locale parm)
provides a method to set the Locale that the threshold information refers to

Parameters:
parm - locale that the strings refer to

setName

public void setName(java.lang.String parm)
provides a method to set the threshold name

Parameters:
parm - string with the name to use to refer to the threshold

setDescription

public void setDescription(java.lang.String parm)
provides a method to set the descriptive text that accompanies the threshold

Parameters:
parm - free form text that may be used to describe the purpose of the threshold

setThreshId

public void setThreshId(TWGMonThresholdId parm)
provides a method to set the thresholdId object in this object

Parameters:
parm - the threshold id object to place in this object

setProgramaticPath

public void setProgramaticPath(TWGMonPath path)
method to set the programmatic version of the attribute path to threshold


setDisplayablePath

public void setDisplayablePath(TWGMonPath path,
                               java.util.Locale locale)
method to set the displayable version of the attribute path to threshold


isEnabled

public boolean isEnabled()
returns the status of the threshold with reguard to generating events

Returns:
boolean indicating if the threshold is enabled to generate events

isEnumerated

public boolean isEnumerated()
returns the status of the threshold with reguard to enumerated values

Returns:
boolean indicating if the threshold has enumerated data values

isChangeBased

public boolean isChangeBased()
Gets whether this threshold should generate events on changes

Returns:
boolean indicating if the threshold is a change based setup

getChangeBasedSeverity

public byte getChangeBasedSeverity()
Gets the monoitor based severity selection that should be associated with threshold events generated for this threshold if change based. If threshold is not change based this value has no meaning

Returns:
byte indicating what severity is associated with the threshold when set as a change based threshold

getID

public TWGMonThresholdId getID()
Returns the object that holds the identification information for objects of this class. this identification includes the threshold id and its creation time and date.

Returns:
TWGMonThresholdId containing identification for the threshold object

getDataType

public byte getDataType()
returns a flag byte indicating the type of threshold this threshold represents (String, numeric, etc.) jret byte with flags indicating the type of threshold this object represents


getTargetGroupID

public int getTargetGroupID()
returns an int that contains the filter group object ID that this threshold was established for. if the value is <= 0 then the threshold was not set on a group.

Returns:
int containing the object identifier of the group that the threshold was applied against.

getTargetSystemID

public long getTargetSystemID()
returns an int that contains the managed object ID that this threshold was established for.

Returns:
long containing the object identifier of the sysetm the threshold was applied against.

getResendDelay

public int getResendDelay()
gets a numeric value that indicates how long a condition must continue to exist after an initial threshold event is generated before another event is generated signaling that the condition continues to exist

Returns:
int containing the amount of time a condition must continue to exist after a prior threshold event before a resend of the event will occur

getSendDelay

public int getSendDelay()
gets a numeric value that indicates how long a condition must first exist before an initial threshold event is generated

Returns:
int containing the amount of time a condition must exist before an event for this threshold is generated

getQueueDepth

public int getQueueDepth()
gets a numeric value that indicates how many events will be queued for this threshold while the server is not available. If more events than this value are generated, the oldest ones are lost.

Returns:
int containing the queue depth for events from this threshold

getDispPathLocale

public java.util.Locale getDispPathLocale()
returns the locale that was specified for the displayable strings when this threshold was created

Returns:
Locale containing the Locale identification for the display strings that this threshold was generated with.

getName

public java.lang.String getName()
returns a string that provides a name for the threshold. while this field is required it need not be unique. It us provided to assist console users in organizing lists of thresholds.

Returns:
String containing the name the threshold was created with.

getDescription

public java.lang.String getDescription()
returns a string that the user specified when the threshold was created. the use for this string is to provide meaningful descriptive text reguarding the reason that a particular threshold was established.

Returns:
String with free form text that has been saved with the threshold as descriptive text

getDoubleData

public TWGMonDoubleThresholdData getDoubleData()
returns the numeric threshold object from a numeric type threshold

Returns:
TWGMonNumericThreshold containing the numeric threshold information for a threshold against a numeric attribute. if the threshold is not for a numeric attribute this method will return a null

getStringData

public TWGMonStringThresholdData getStringData()
returns the string threshold object from a string type threshold

Returns:
TWGMonStringThreshold containing the string threshold information for a threshold against a string attribute. if the threshold is not for a string attribute this method will return a null

getProgPath

public TWGMonPath getProgPath()
returns the information that describes the path that is being thresholded in a form that is appropriate for programatic decisions

Returns:
TWGMonPath containing the programatic path information that describes which attribute the threshold applies to

getDispPath

public TWGMonPath getDispPath()
returns the information that describes the path that is being thresholded in a form that is appropriate for display on a console

Returns:
TWGMonPath containing the displayable path information that describes which attribute the threshold applies to

isValid

public boolean isValid()
Gets whether this object contains valid data. this will only return a true value after the acceptable method has been run against the object and found everything to be okey-doky

Returns:
boolean indicating if the data is valid

isAcceptable

public boolean isAcceptable()
returns indication if the data in the object would be acceptable to the server

Returns:
boolean indicating if the threshold checks out, also has side effect of setting valid bit

isNewThreshold

public boolean isNewThreshold()
Gets whether this object contains a thresholdId from the server

Returns:
boolean indicating if the threshold was from the server

toString

public java.lang.String toString()
returns a string string for debuging that contains in readable text the current state of the object

Returns:
String containing the current state of the object for display as part of debugging