Package com.redwood.scheduler.api.model
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.
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "ProcessServerCheck" objects.static String
SEC_RANK_ALL
This rank is made of the following privileges:static String
SEC_RANK_NONE
This rank has no privileges assigned to it.static QueryObjectType<ProcessServerCheck>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProcessServerCheckLog
createProcessServerCheckLog()
Create a newProcessServerCheckLog
linked to this object.void
execute()
Executes the ProcessServerCheckvoid
executeAndReact()
Executes the ProcessServerCheck and takes action if the check failsString
getAddress()
Get the value for Address.AdHocAlertSource
getAdHocAlertSource()
Get the AdHocAlertSource.String
getAttribute1()
Get the value for Attribute1.String
getAttribute2()
Get the value for Attribute2.String
getConditionExpression()
Get the value for ConditionExpression.String
getData()
Get the value for Data.Long
getDelayAmount()
Get the value for DelayAmount.TimeUnit
getDelayUnits()
Get the value for DelayUnits.JobDefinition
getJobDefinition()
Get the JobDefinition.String
getMessage()
Get the value for Message.List<ProcessServerCheckAttributeInfo>
getParameters()
A list of ProcessServerCheckAttributeInfo objects describing each attribute.Long
getPollInterval()
Get the value for PollInterval.ProcessServer
getProcessServer()
Get the ProcessServer.ProcessServerCheckLog
getProcessServerCheckLogByCreationTime(DateTimeZone creationTime)
Get the ProcessServerCheckLog by ProcessServerCheckCreationTime.RWIterable<ProcessServerCheckLog>
getProcessServerCheckLogs()
Get anRWIterable
over an ordered collection ofProcessServerCheckLogs
.Long
getSeverity()
Get the value for Severity.ProcessServerCheckStyle
getStyle()
Get the value for Style.boolean
isEnabled()
Get the value for Enabled.void
setAddress(String newAddress)
Set the value for Address.void
setAdHocAlertSource(AdHocAlertSource newAdHocAlertSource)
Set the value for AdHocAlertSource.void
setAttribute1(String newAttribute1)
Set the value for Attribute1.void
setAttribute2(String newAttribute2)
Set the value for Attribute2.void
setConditionExpression(String newConditionExpression)
Set the value for ConditionExpression.void
setData(String newData)
Set the value for Data.void
setDelayAmount(Long newDelayAmount)
Set the value for DelayAmount.void
setDelayUnits(TimeUnit newDelayUnits)
Set the value for DelayUnits.void
setEnabled(boolean newEnabled)
Set the value for Enabled.void
setJobDefinition(JobDefinition newJobDefinition)
Set the value for JobDefinition.void
setMessage(String newMessage)
Set the value for Message.void
setPollInterval(Long newPollInterval)
Set the value for PollInterval.void
setSeverity(Long newSeverity)
Set the value for Severity.void
setStyle(ProcessServerCheckStyle newStyle)
Set the value for Style.void
validate()
Ensures that the parameters set for a ProcessServerCheck are valid-
Methods inherited from interface com.redwood.scheduler.api.model.NamedDetailObject
getComment, getDescription, getName, getSearchName, setComment, setDescription, setName
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "ProcessServerCheck" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<ProcessServerCheck> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges:- See Also:
- Constant Field Values
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Get the value for Enabled. (Whether this process server check is currently enabled.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.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 benull
if this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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 isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.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 isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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 isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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 isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.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 isnull
, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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:
com.redwood.scheduler.api.exception.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
-
validate
void validate() throws com.redwood.scheduler.api.exception.ProcessServerCheckValidateException, com.redwood.scheduler.api.exception.ProcessServerCheckSystemException
Ensures that the parameters set for a ProcessServerCheck are valid- Throws:
com.redwood.scheduler.api.exception.ProcessServerCheckValidateException
- The attributes defined for a Process Server Check failed validationcom.redwood.scheduler.api.exception.ProcessServerCheckSystemException
- An IO or other system exception occurred while executing a Process Server Check
-
execute
void execute() throws com.redwood.scheduler.api.exception.ProcessServerCheckFailException, com.redwood.scheduler.api.exception.ProcessServerCheckValidateException, com.redwood.scheduler.api.exception.ProcessServerCheckSystemException
Executes the ProcessServerCheck- Throws:
com.redwood.scheduler.api.exception.ProcessServerCheckFailException
- A Process Server Check failed to meet the defined threshold(s)com.redwood.scheduler.api.exception.ProcessServerCheckValidateException
- The attributes defined for a Process Server Check failed validationcom.redwood.scheduler.api.exception.ProcessServerCheckSystemException
- An IO or other system exception occurred while executing a Process Server Check
-
executeAndReact
void executeAndReact() throws com.redwood.scheduler.api.exception.ProcessServerCheckValidateException, com.redwood.scheduler.api.exception.ProcessServerCheckSystemException
Executes the ProcessServerCheck and takes action if the check fails- Throws:
com.redwood.scheduler.api.exception.ProcessServerCheckValidateException
- The attributes defined for a Process Server Check failed validationcom.redwood.scheduler.api.exception.ProcessServerCheckSystemException
- An IO or other system exception occurred while executing a Process Server Check
-
getProcessServer
ProcessServer getProcessServer()
Get the ProcessServer.- Returns:
- ProcessServer
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException
- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getAdHocAlertSource
AdHocAlertSource getAdHocAlertSource()
Get the AdHocAlertSource.- Returns:
- AdHocAlertSource
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException
- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
getJobDefinition
JobDefinition getJobDefinition()
Get the JobDefinition.- Returns:
- JobDefinition
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException
- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException
- If this method is called when the object has been removed from it's session.
-
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
-
getProcessServerCheckLogs
RWIterable<ProcessServerCheckLog> getProcessServerCheckLogs()
Get anRWIterable
over an ordered collection ofProcessServerCheckLogs
. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
. ProcessServerCheckLog logging the success state of a ProcessServerCheck.- Specified by:
getProcessServerCheckLogs
in interfaceProcessServerCheckComp
- Returns:
- An
RWIterable
over an ordered collection ofProcessServerCheckLog
objects .
-
createProcessServerCheckLog
ProcessServerCheckLog createProcessServerCheckLog()
Create a newProcessServerCheckLog
linked to this object.- Returns:
- a new
ProcessServerCheckLog
.
-
getProcessServerCheckLogByCreationTime
ProcessServerCheckLog getProcessServerCheckLogByCreationTime(DateTimeZone creationTime)
Get the ProcessServerCheckLog by ProcessServerCheckCreationTime.- Parameters:
creationTime
-- Returns:
- the ProcessServerCheckLog, or
null
if it could not be found
-
-