Class InterruptFlag

java.lang.Object
com.semedy.reasoner.api.reasoning.InterruptFlag

public final class InterruptFlag extends Object
This flag indicates the reasoner, that the evaluation must be interrupted
Author:
angele
  • Constructor Details

    • InterruptFlag

      public InterruptFlag()
  • Method Details

    • getReason

      public String getReason()
    • clear

      public void clear()
      clear flag
    • interrupt

      public void interrupt()
      tell the reasoner that the evaluation must be interrupted
    • interrupt

      public void interrupt(String reason)
      tell the reasoner that the evaluation must be interrupted
    • isInterrupted

      public boolean isInterrupted()
      check the interrupt flag
      Returns:
    • checkInterrupted

      public void checkInterrupted() throws InterruptedException
      throw interrupt exception if flag is set
      Throws:
      InterruptedException
    • addInterruptListener

      public void addInterruptListener(InterruptListener listener)
      add listener to listen for interrupts
      Parameters:
      listener -
    • removeInterruptListener

      public boolean removeInterruptListener(InterruptListener listener)
      remove a listener for interrupts
      Parameters:
      listener -
      Returns:
    • removeAllInterruptListeners

      public void removeAllInterruptListeners()
      remove all listeners for interrupts