com.ibm.sysmgt.sdk.remote
Class Threshold

java.lang.Object
  extended bycom.ibm.sysmgt.sdk.remote.Threshold
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
NumericThreshold, StringThreshold

public class Threshold
extends java.lang.Object
implements java.io.Serializable

Represents a Director Threshold

See Also:
Serialized Form

Field Summary
static int THRESHOLD_TYPE_NUMERIC
           
static int THRESHOLD_TYPE_STRING
           
 
Constructor Summary
Threshold()
           
Threshold(int thresholdID, long thresholdCTAD, java.lang.String label, java.lang.String description, boolean enabled, java.util.Vector programaticPath, java.lang.String displayablePath)
           
 
Method Summary
static java.util.List getAllThresholds(LoginSession session)
          getAllThresholds
static java.util.List getAllThresholdsForGroup(LoginSession session, long groupOid)
          getAllThresholdsForGroup
static java.util.List getAllThresholdsForGroup(LoginSession session, ManagedGroup g)
          getAllThresholdsForGroup
static java.util.List getAllThresholdsForSystem(LoginSession session, long MOID)
          getAllThresholdsForSystem
static java.util.List getAllThresholdsForSystem(LoginSession session, ManagedSystem managedSystem)
          getAllThresholdsForSystem
 java.lang.String getAttributeLabel()
           
 java.lang.Boolean getCurrentStatusForSystem(LoginSession session, ManagedSystem managedSystem)
           
 DataValue getCurrentValue(LoginSession session)
           
 ThresholdSystemInfo getCurrentValueAndAlertStateForSystem(LoginSession session, ManagedSystem managedSystem)
           
 DataValue getCurrentValueForSystem(LoginSession session, ManagedSystem managedSystem)
           
 java.lang.String getDescription()
           
 java.lang.String getDisplayablePath()
           
 java.lang.String getID()
          getID
 java.lang.String getLabel()
           
 java.lang.String getName()
           
 java.util.Vector getProgramaticPath()
           
 int getResendDelay()
           
 int getSendDelay()
           
 CompositeSystem getTarget(LoginSession s)
           
 long getTargetOid()
           
static Threshold getThresholdByID(LoginSession session, java.lang.String id)
          getAllThresholds
 long getThresholdCTAD()
           
 int getThresholdID()
           
 int getThresholdType()
           
 boolean isEnabled()
          isEnabled
 boolean isGenerateOnValueChange()
           
 boolean isIndividualThreshold()
           
 void setDescription(java.lang.String string)
          INTERNAL USE ONLY
 void setDisplayablePath(java.lang.String string)
          INTERNAL USE ONLY
 void setEnabled(boolean b)
          INTERNAL USE ONLY
 boolean setEnabled(LoginSession session, boolean flag)
           
 void setGenerateOnValueChange(boolean b)
           
 void setIndividualThreshold(boolean b)
          INTERNAL USE ONLY
 void setLabel(java.lang.String string)
          INTERNAL USE ONLY
 void setProgramaticPath(java.util.Vector path)
          INTERNAL USE ONLY
 void setResendDelay(int i)
          INTERNAL USE ONLY
 void setSendDelay(int i)
          INTERNAL USE ONLY
 void setTargetOid(long l)
          INTERNAL USE ONLY
 void setThresholdCTAD(long l)
          INTERNAL USE ONLY
 void setThresholdID(int i)
          INTERNAL USE ONLY
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

THRESHOLD_TYPE_NUMERIC

public static final int THRESHOLD_TYPE_NUMERIC
See Also:
Constant Field Values

THRESHOLD_TYPE_STRING

public static final int THRESHOLD_TYPE_STRING
See Also:
Constant Field Values
Constructor Detail

Threshold

public Threshold()

Threshold

public Threshold(int thresholdID,
                 long thresholdCTAD,
                 java.lang.String label,
                 java.lang.String description,
                 boolean enabled,
                 java.util.Vector programaticPath,
                 java.lang.String displayablePath)
Method Detail

getThresholdType

public int getThresholdType()

isGenerateOnValueChange

public boolean isGenerateOnValueChange()
Returns:

setGenerateOnValueChange

public void setGenerateOnValueChange(boolean b)
Parameters:
b -

getID

public java.lang.String getID()
getID

Returns:
A String ID

getThresholdByID

public static Threshold getThresholdByID(LoginSession session,
                                         java.lang.String id)
                                  throws ServerCommunicationException,
                                         RequestFailedException
getAllThresholds

Parameters:
session -
Returns:
A List of Threshold objects
Throws:
ServerCommunicationException
RequestFailedException

getAllThresholds

public static java.util.List getAllThresholds(LoginSession session)
                                       throws ServerCommunicationException,
                                              RequestFailedException
getAllThresholds

Parameters:
session -
Returns:
A List of Threshold objects
Throws:
ServerCommunicationException
RequestFailedException

getAllThresholdsForSystem

public static java.util.List getAllThresholdsForSystem(LoginSession session,
                                                       ManagedSystem managedSystem)
                                                throws ServerCommunicationException,
                                                       RequestFailedException
getAllThresholdsForSystem

Parameters:
session -
managedSystem -
Returns:
A List of Threshold objects
Throws:
ServerCommunicationException
RequestFailedException

getAllThresholdsForSystem

public static java.util.List getAllThresholdsForSystem(LoginSession session,
                                                       long MOID)
                                                throws ServerCommunicationException,
                                                       RequestFailedException
getAllThresholdsForSystem

Parameters:
session -
Returns:
A List of Threshold objects
Throws:
ServerCommunicationException
RequestFailedException

getAllThresholdsForGroup

public static java.util.List getAllThresholdsForGroup(LoginSession session,
                                                      ManagedGroup g)
                                               throws ServerCommunicationException,
                                                      RequestFailedException
getAllThresholdsForGroup

Parameters:
session -
Returns:
A List of Threshold objects
Throws:
ServerCommunicationException
RequestFailedException

getAllThresholdsForGroup

public static java.util.List getAllThresholdsForGroup(LoginSession session,
                                                      long groupOid)
                                               throws ServerCommunicationException,
                                                      RequestFailedException
getAllThresholdsForGroup

Parameters:
session -
Returns:
A List of Threshold objects
Throws:
ServerCommunicationException
RequestFailedException

isEnabled

public boolean isEnabled()
isEnabled

Returns:
true if the Threshold is enabled

setEnabled

public boolean setEnabled(LoginSession session,
                          boolean flag)
                   throws ServerCommunicationException,
                          RequestFailedException
Parameters:
session -
flag -
Returns:
true if the Threshold is enabled
Throws:
ServerCommunicationException
RequestFailedException

getCurrentValue

public DataValue getCurrentValue(LoginSession session)
                          throws ServerCommunicationException,
                                 RequestFailedException
Parameters:
session -
Returns:
A DataValue representing the current value of the Attribute. If this is a group Threshold, this method will return null.
Throws:
ServerCommunicationException
RequestFailedException

getCurrentValueForSystem

public DataValue getCurrentValueForSystem(LoginSession session,
                                          ManagedSystem managedSystem)
                                   throws ServerCommunicationException,
                                          RequestFailedException
Parameters:
session -
managedSystem -
Returns:
A DataValue representing the current value of the attribute on the given managed system.
Throws:
ServerCommunicationException
RequestFailedException

getCurrentValueAndAlertStateForSystem

public ThresholdSystemInfo getCurrentValueAndAlertStateForSystem(LoginSession session,
                                                                 ManagedSystem managedSystem)
                                                          throws ServerCommunicationException,
                                                                 RequestFailedException
Parameters:
session -
managedSystem -
Returns:
A list. first item containing value and second item containing state
Throws:
ServerCommunicationException
RequestFailedException

getCurrentStatusForSystem

public java.lang.Boolean getCurrentStatusForSystem(LoginSession session,
                                                   ManagedSystem managedSystem)
                                            throws ServerCommunicationException,
                                                   RequestFailedException
Parameters:
session -
managedSystem -
Returns:
A Boolean indicating if the Threshold has triggered and event return false if the Threshold has not triggered an event or if the threshold does not have data.
Throws:
ServerCommunicationException
RequestFailedException

getName

public java.lang.String getName()
Returns:
The name for the Threshold. The Name was entered by the user at the Director Console

getLabel

public java.lang.String getLabel()
Returns:
The name for the Threshold. The name was entered by the user at the Director Console

getAttributeLabel

public java.lang.String getAttributeLabel()
Returns:
The lable of the attribute being monitored.

getResendDelay

public int getResendDelay()
Returns:
The "Resend Delay" for the threshold (in seconds)

getSendDelay

public int getSendDelay()
Returns:
The "Minimum Duration" for the threshold (in seconds)

setLabel

public void setLabel(java.lang.String string)
INTERNAL USE ONLY

Parameters:
string -

setProgramaticPath

public void setProgramaticPath(java.util.Vector path)
INTERNAL USE ONLY


setResendDelay

public void setResendDelay(int i)
INTERNAL USE ONLY

Parameters:
i -

setSendDelay

public void setSendDelay(int i)
INTERNAL USE ONLY

Parameters:
i -

getThresholdID

public int getThresholdID()
Returns:
an ID which represents the Threshold

getThresholdCTAD

public long getThresholdCTAD()
Returns:
the CTAD associated with the Threshold

setThresholdID

public void setThresholdID(int i)
INTERNAL USE ONLY


setThresholdCTAD

public void setThresholdCTAD(long l)
INTERNAL USE ONLY

Parameters:
l -

toString

public java.lang.String toString()

getDescription

public java.lang.String getDescription()
Returns:
The description of the Threshold as entered at the Director Console

setDescription

public void setDescription(java.lang.String string)
INTERNAL USE ONLY

Parameters:
string -

getDisplayablePath

public java.lang.String getDisplayablePath()
Returns:
the path of the attribute being monitored.

getProgramaticPath

public java.util.Vector getProgramaticPath()
Returns:
the symbolic representation of the path of the attribute being monitored.

isIndividualThreshold

public boolean isIndividualThreshold()
Returns:
true if the Threshold is for an individual ManageSystem, false if the Threshold is for a ManagedGroup

getTarget

public CompositeSystem getTarget(LoginSession s)
                          throws ServerCommunicationException,
                                 RequestFailedException
Returns:
The OID for the system or group monitored by this Threshold
Throws:
ServerCommunicationException
RequestFailedException

getTargetOid

public long getTargetOid()
Returns:
The OID for the system or group monitored by this Threshold

setDisplayablePath

public void setDisplayablePath(java.lang.String string)
INTERNAL USE ONLY


setEnabled

public void setEnabled(boolean b)
INTERNAL USE ONLY

Parameters:
b -

setIndividualThreshold

public void setIndividualThreshold(boolean b)
INTERNAL USE ONLY

Parameters:
b -

setTargetOid

public void setTargetOid(long l)
INTERNAL USE ONLY

Parameters:
l -