Interface ConditionHandler

All Superinterfaces:
ModuleHandler
All Known Subinterfaces:
TimeBasedConditionHandler
All Known Implementing Classes:
BaseConditionModuleHandler

@NonNullByDefault public interface ConditionHandler extends ModuleHandler
This interface provides common functionality for processing Condition modules.
Author:
Yordan Mihaylov - Initial contribution, Ana Dimova - Initial contribution, Vasil Ilchev - Initial contribution
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Called to compile the Condition when the Rule is initialized.
    boolean
    Checks if the Condition is satisfied in the given context.

    Methods inherited from interface org.openhab.core.automation.handler.ModuleHandler

    dispose, setCallback
  • Method Details

    • compile

      default void compile() throws Exception
      Called to compile the Condition when the Rule is initialized.
      Throws:
      Exception - if the compilation fails
    • isSatisfied

      boolean isSatisfied(Map<String,Object> context)
      Checks if the Condition is satisfied in the given context.
      Parameters:
      context - an unmodifiable map containing the outputs of the Trigger that triggered the Rule and the inputs of the Condition.
      Returns:
      true if Condition is satisfied, false otherwise.