Interface ProcessServerCheck

  • All Superinterfaces:
    Detail, NamedDetailObject, ProcessServerCheckComp, Readable, SchedulerEntity, SchedulerEntityComp

    public interface ProcessServerCheck
    extends ProcessServerCheckComp, NamedDetailObject, Readable
    A check on the status of a particular part of the server that the ProcessServer runs on. A ProcessServerCheck creates a Monitor Check with the path /System/ProcessServers/${ProcessServer}/Check/${Name} A ProcessServerCheck creates a Monitor Value with the path /System/ProcessServers/${ProcessServer}/Check/${Name}/${Style-Derived} where ${Style-Derived} is a term derived from the style. For Process,Socket,Win32Service it is Count. For LogFile and Win32Eventlog it is Message.
    • Method Detail

      • isEnabled

        boolean isEnabled()
        Get the value for Enabled. (Whether this process server check is currently enabled.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getStyle

        ProcessServerCheckStyle getStyle()
        Get the value for Style. (The style or type of the check) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getAttribute1

        String getAttribute1()
        Get the value for Attribute1. (The first attribute, meaning is style dependent) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getAttribute2

        String getAttribute2()
        Get the value for Attribute2. (The second attribute, meaning is style dependent)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getPollInterval

        Long getPollInterval()
        Get the value for PollInterval. (Polling interval that servers as the upper bound for how often the check is performed.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getSeverity

        Long getSeverity()
        Get the value for Severity. (The severity that the resulting monitor check will get when the check fails the condition, or null for the system default.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getConditionExpression

        String getConditionExpression()
        Get the value for ConditionExpression. (The (optional) condition expression. If this is set, then the expression is evaluated to evaluate whether the condition is met. The default condition is '= Count < 1' which means that the Monitor will be set to a severity if no item in the system matches the search condition(s) set in Attribute 1 and 2.)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getDelayAmount

        Long getDelayAmount()
        Get the value for DelayAmount. ( Number of 'delay time units' after a ProcessServerCheck has failed to rerun the check. On failure of the check for the second time a relevant reaction will be triggered. Leave unassigned or assign null if the check is not to be rerun on failure. ) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getDelayUnits

        TimeUnit getDelayUnits()
        Get the value for DelayUnits. (Time units for 'delay amount' - seconds, minutes, hours, days. May not be null, defaults to minutes) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getAddress

        String getAddress()
        Get the value for Address. (The address parameter of the reaction job)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getMessage

        String getMessage()
        Get the value for Message. (The message parameter of the reaction job)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getData

        String getData()
        Get the value for Data. (The data parameter of the reaction job)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setEnabled

        void setEnabled​(boolean newEnabled)
        Set the value for Enabled. (Whether this process server check is currently enabled.)
        Parameters:
        newEnabled - the new value for Enabled.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setStyle

        void setStyle​(ProcessServerCheckStyle newStyle)
        Set the value for Style. (The style or type of the check) This value is mandatory.
        Parameters:
        newStyle - the new value for Style. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setAttribute1

        void setAttribute1​(String newAttribute1)
        Set the value for Attribute1. (The first attribute, meaning is style dependent) This value is mandatory.
        Parameters:
        newAttribute1 - the new value for Attribute1. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setAttribute2

        void setAttribute2​(String newAttribute2)
        Set the value for Attribute2. (The second attribute, meaning is style dependent) This value is optional.
        Parameters:
        newAttribute2 - the new value for Attribute2.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setPollInterval

        void setPollInterval​(Long newPollInterval)
        Set the value for PollInterval. (Polling interval that servers as the upper bound for how often the check is performed.) This value is mandatory.
        Parameters:
        newPollInterval - the new value for PollInterval. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setSeverity

        void setSeverity​(Long newSeverity)
        Set the value for Severity. (The severity that the resulting monitor check will get when the check fails the condition, or null for the system default.) This value is optional.
        Parameters:
        newSeverity - the new value for Severity.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setConditionExpression

        void setConditionExpression​(String newConditionExpression)
        Set the value for ConditionExpression. (The (optional) condition expression. If this is set, then the expression is evaluated to evaluate whether the condition is met. The default condition is '= Count < 1' which means that the Monitor will be set to a severity if no item in the system matches the search condition(s) set in Attribute 1 and 2.) This value is optional.
        Parameters:
        newConditionExpression - the new value for ConditionExpression.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setDelayAmount

        void setDelayAmount​(Long newDelayAmount)
        Set the value for DelayAmount. ( Number of 'delay time units' after a ProcessServerCheck has failed to rerun the check. On failure of the check for the second time a relevant reaction will be triggered. Leave unassigned or assign null if the check is not to be rerun on failure. ) This value is mandatory.
        Parameters:
        newDelayAmount - the new value for DelayAmount. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setDelayUnits

        void setDelayUnits​(TimeUnit newDelayUnits)
        Set the value for DelayUnits. (Time units for 'delay amount' - seconds, minutes, hours, days. May not be null, defaults to minutes) This value is mandatory.
        Parameters:
        newDelayUnits - the new value for DelayUnits. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setAddress

        void setAddress​(String newAddress)
        Set the value for Address. (The address parameter of the reaction job) This value is optional.
        Parameters:
        newAddress - the new value for Address.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setMessage

        void setMessage​(String newMessage)
        Set the value for Message. (The message parameter of the reaction job) This value is optional.
        Parameters:
        newMessage - the new value for Message.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setData

        void setData​(String newData)
        Set the value for Data. (The data parameter of the reaction job) This value is optional.
        Parameters:
        newData - the new value for Data.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getParameters

        List<ProcessServerCheckAttributeInfo> getParameters()
        A list of ProcessServerCheckAttributeInfo objects describing each attribute. Each object contains a translation keys that is used as the label for the attribute. The list will contain zero, one or two object. Zero objects means there are no attributes for the check and both fields are disabled. One object means one attribute1 is made available and attribute2 is disabled. Two objects makes both attributes available for entry.
        Returns:
        The list of ProcessServerCheckAttributeInfo objects describing the attributes
      • setAdHocAlertSource

        void setAdHocAlertSource​(AdHocAlertSource newAdHocAlertSource)
        Set the value for AdHocAlertSource. This value is optional.
        Parameters:
        newAdHocAlertSource - is the object to set AdHocAlertSource to. AdHocAlertSource that is used to raise an alert when the ProcessServerCheck fails
      • setJobDefinition

        void setJobDefinition​(JobDefinition newJobDefinition)
        Set the value for JobDefinition. This value is optional.
        Parameters:
        newJobDefinition - is the object to set JobDefinition to. Reaction JobDefiniton that is submitted on failure of the ProcessServerCheck
      • getProcessServerCheckLogByCreationTime

        ProcessServerCheckLog getProcessServerCheckLogByCreationTime​(DateTimeZone creationTime)
        Get the ProcessServerCheckLog by ProcessServerCheckCreationTime.
        Parameters:
        creationTime -
        Returns:
        the ProcessServerCheckLog, or null if it could not be found