Package gda.beamline.health
Interface ComponentHealthCondition
- All Known Implementing Classes:
ActiveMQServerCondition,ComponentHealthConditionBase,DAServerCondition,EnumPositionCondition,IspybServiceCondition,MalcolmProcessCondition,ProcessingServerCondition,RateLimitedServerCondition,ScannableHealthCondition,ScannableThresholdCondition,ServerCondition
public interface ComponentHealthCondition
This represents a condition on a component of the beamline which contributes to its overall health.
It could for example check whether a scannable is within an acceptable range, or whether a required service is running.
It could for example check whether a scannable is within an acceptable range, or whether a required service is running.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the current state of the component.
For a scannable, this would be its position: for a service, it could indicate whether it is running, paused etc.Return a user-friendly description of the component e.g.Return a message that can be displayed to the user is the corresponding condition is not metReturn the health state for this component, based on the condition itself and whether it is critical for the functioning of the beamline.booleanIndicate whether this is critical for the overall health of the beamlinebooleanIndicates whether the condition is enabled.voidsetCritical(boolean critical) voidsetDescription(String description) voidsetEnabled(boolean enabled) voidsetErrorMessage(String errorMessage)
-
Method Details
-
getCurrentState
String getCurrentState()Return the current state of the component.
For a scannable, this would be its position: for a service, it could indicate whether it is running, paused etc. -
getHealthState
BeamlineHealthState getHealthState()Return the health state for this component, based on the condition itself and whether it is critical for the functioning of the beamline. -
getDescription
String getDescription()Return a user-friendly description of the component e.g. for display in the GUI -
setDescription
-
getErrorMessage
String getErrorMessage()Return a message that can be displayed to the user is the corresponding condition is not met -
setErrorMessage
-
isCritical
boolean isCritical()Indicate whether this is critical for the overall health of the beamline -
setCritical
void setCritical(boolean critical) -
isEnabled
boolean isEnabled()Indicates whether the condition is enabled. -
setEnabled
void setEnabled(boolean enabled)
-