Class CriterionProcessor
java.lang.Object
org.sentrysoftware.metricshub.engine.strategy.detection.CriterionProcessor
- All Implemented Interfaces:
ICriterionProcessor
The `CriterionProcessor` class is responsible for processing various criteria,
facilitating detection operations related to different aspects such as IPMI, HTTP, SNMP, etc.
This class integrates with ClientsExecutor and TelemetryManager to execute criterion-specific tests and log relevant information. It also utilizes a WqlDetectionHelper for Windows Management Instrumentation (WMI) queries.
The class includes methods for processing different types of criteria, such as IpmiCriterion, HttpCriterion, DeviceTypeCriterion.
-
Constructor Summary
ConstructorsConstructorDescriptionCriterionProcessor(ClientsExecutor clientsExecutor, TelemetryManager telemetryManager, String connectorId, ExtensionManager extensionManager) Constructor for the CriterionProcessor class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisDeviceKindIncluded(List<DeviceKind> deviceKindList, DeviceTypeCriterion deviceTypeCriterion) Return true if the deviceKind in the deviceKindList is included in the DeviceTypeCriterion detection.process(CommandLineCriterion commandLineCriterion) Process the givenCommandLineCriterionthrough Client and return theCriterionTestResultprocess(DeviceTypeCriterion deviceTypeCriterion) Process the givenDeviceTypeCriterionand return theCriterionTestResultprocess(HttpCriterion httpCriterion) Process the givenHttpCriterionthrough Client and return theCriterionTestResultprocess(IpmiCriterion ipmiCriterion) Process the givenIpmiCriterionthrough Client and return theCriterionTestResultprocess(ProcessCriterion processCriterion) Process the givenProcessCriterionthrough Client and return theCriterionTestResultprocess(ProductRequirementsCriterion productRequirementsCriterion) Process the givenProductRequirementsCriterionand return theCriterionTestResult.process(ServiceCriterion serviceCriterion) Process the givenServiceCriterionthrough Client and return theCriterionTestResultprocess(SnmpGetCriterion snmpGetCriterion) Process the givenSnmpGetCriterionthrough Client and return theCriterionTestResultprocess(SnmpGetNextCriterion snmpGetNextCriterion) Process the givenSnmpGetNextCriterionthrough Client and return theCriterionTestResultprocess(WbemCriterion wbemCriterion) Process the givenWbemCriterionthrough Client and return theCriterionTestResultprocess(WmiCriterion wmiCriterion) Process the givenWmiCriterionthrough Client and return theCriterionTestResult
-
Constructor Details
-
CriterionProcessor
public CriterionProcessor(ClientsExecutor clientsExecutor, TelemetryManager telemetryManager, String connectorId, ExtensionManager extensionManager) Constructor for the CriterionProcessor class.- Parameters:
clientsExecutor- The ClientsExecutor instance.telemetryManager- The TelemetryManager instance.connectorId- The connector ID.
-
-
Method Details
-
process
Process the givenDeviceTypeCriterionand return theCriterionTestResult- Specified by:
processin interfaceICriterionProcessor- Parameters:
deviceTypeCriterion- The DeviceTypeCriterion to process.- Returns:
- New
CriterionTestResultinstance.
-
isDeviceKindIncluded
public boolean isDeviceKindIncluded(List<DeviceKind> deviceKindList, DeviceTypeCriterion deviceTypeCriterion) Return true if the deviceKind in the deviceKindList is included in the DeviceTypeCriterion detection.- Parameters:
deviceKindList- The list of DeviceKind values to check.deviceTypeCriterion- The DeviceTypeCriterion for detection.- Returns:
- True if the deviceKind in the deviceKindList is included; otherwise, false.
-
process
Process the givenHttpCriterionthrough Client and return theCriterionTestResult- Specified by:
processin interfaceICriterionProcessor- Parameters:
httpCriterion- The HTTP criterion to process.- Returns:
- New
CriterionTestResultinstance.
-
process
Process the givenIpmiCriterionthrough Client and return theCriterionTestResult- Specified by:
processin interfaceICriterionProcessor- Parameters:
ipmiCriterion- The IPMI criterion to process.- Returns:
- CriterionTestResult instance.
-
process
Process the givenCommandLineCriterionthrough Client and return theCriterionTestResult- Specified by:
processin interfaceICriterionProcessor- Parameters:
commandLineCriterion- TheCommandLineCriterionto process.- Returns:
CriterionTestResultinstance.
-
process
Process the givenProcessCriterionthrough Client and return theCriterionTestResult- Specified by:
processin interfaceICriterionProcessor- Parameters:
processCriterion- TheProcessCriterionto process.- Returns:
CriterionTestResultinstance.
-
process
Process the givenProductRequirementsCriterionand return theCriterionTestResult.- Specified by:
processin interfaceICriterionProcessor- Parameters:
productRequirementsCriterion- TheProductRequirementsCriterionto process.- Returns:
CriterionTestResultinstance.
-
process
Process the givenServiceCriterionthrough Client and return theCriterionTestResult- Specified by:
processin interfaceICriterionProcessor- Parameters:
serviceCriterion- TheServiceCriterionto process.- Returns:
CriterionTestResultinstance.
-
process
Process the givenSnmpGetCriterionthrough Client and return theCriterionTestResult- Specified by:
processin interfaceICriterionProcessor- Parameters:
snmpGetCriterion- The SNMP Get criterion to process.- Returns:
- The result of the criterion test.
-
process
Process the givenSnmpGetNextCriterionthrough Client and return theCriterionTestResult- Specified by:
processin interfaceICriterionProcessor- Parameters:
snmpGetNextCriterion- The SNMP GetNext criterion to process.- Returns:
- The result of the criterion test.
-
process
Process the givenWmiCriterionthrough Client and return theCriterionTestResult- Specified by:
processin interfaceICriterionProcessor- Parameters:
wmiCriterion- The WMI criterion to process.- Returns:
- The result of the criterion test processing.
-
process
Process the givenWbemCriterionthrough Client and return theCriterionTestResult- Specified by:
processin interfaceICriterionProcessor- Parameters:
wbemCriterion- The WBEM criterion to process.- Returns:
- The result of the criterion test processing.
-