Class SimpleInstructionExecutionService

java.lang.Object
net.solarnetwork.node.reactor.SimpleInstructionExecutionService
All Implemented Interfaces:
InstructionExecutionService

public class SimpleInstructionExecutionService extends Object implements InstructionExecutionService
Default implementation of InstructionExecutionService.
Since:
2.0
Version:
1.0
Author:
matt
  • Field Details

    • DEFAULT_EXECUTION_RECEIVED_HOUR_LIMIT

      public static final int DEFAULT_EXECUTION_RECEIVED_HOUR_LIMIT
      Default value for the executionReceivedHourLimit property.
      See Also:
  • Constructor Details

  • Method Details

    • executeInstruction

      public InstructionStatus executeInstruction(Instruction instruction)
      Description copied from interface: InstructionExecutionService
      Execute a single instruction.
      Specified by:
      executeInstruction in interface InstructionExecutionService
      Parameters:
      instruction - the instruction to execute
      Returns:
      the resulting status for the instruction, or null if not handled
    • setExecutionReceivedHourLimit

      public void setExecutionReceivedHourLimit(int executionReceivedHourLimit)
      Set the minimum amount of time to wait before forcing instructions into the InstructionStatus.InstructionState.Declined state. This prevents instructions not handled by any handler from sticking around on the node indefinitely. Defaults to DEFAULT_EXECUTION_RECEIVED_HOUR_LIMIT.
      Parameters:
      executionReceivedHourLimit - the hour limit