Class InterruptFlag
java.lang.Object
com.semedy.reasoner.api.reasoning.InterruptFlag
This flag indicates the reasoner, that the evaluation must be interrupted
- Author:
- angele
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInterruptListener(InterruptListener listener) add listener to listen for interruptsvoidthrow interrupt exception if flag is setvoidclear()clear flagvoidtell the reasoner that the evaluation must be interruptedvoidtell the reasoner that the evaluation must be interruptedbooleancheck the interrupt flagvoidremove all listeners for interruptsbooleanremoveInterruptListener(InterruptListener listener) remove a listener for interrupts
-
Constructor Details
-
InterruptFlag
public InterruptFlag()
-
-
Method Details
-
getReason
-
clear
public void clear()clear flag -
interrupt
public void interrupt()tell the reasoner that the evaluation must be interrupted -
interrupt
tell the reasoner that the evaluation must be interrupted -
isInterrupted
public boolean isInterrupted()check the interrupt flag- Returns:
-
checkInterrupted
throw interrupt exception if flag is set- Throws:
InterruptedException
-
addInterruptListener
add listener to listen for interrupts- Parameters:
listener-
-
removeInterruptListener
remove a listener for interrupts- Parameters:
listener-- Returns:
-
removeAllInterruptListeners
public void removeAllInterruptListeners()remove all listeners for interrupts
-