com.declarativa.interprolog.util
Class GoalToExecute
java.lang.Object
com.declarativa.interprolog.util.GoalToExecute
- public class GoalToExecute
- extends Object
A goal scheduled to execute in Prolog whenever possible
GoalToExecute
public GoalToExecute(GoalFromJava goal)
GoalToExecute
public GoalToExecute(GoalFromJava goal,
Thread t)
getCallerThread
public Thread getCallerThread()
executeInThread
public void executeInThread(Runnable r)
waitForResult
public ResultFromProlog waitForResult()
- Obtain result for a Prolog goal, blocking until it is available; meanwhile it will execute
Runnables if so requested
setResult
public void setResult(ResultFromProlog result)
wasInterrupted
public boolean wasInterrupted()
wasAborted
public boolean wasAborted()
interrupt
public void interrupt()
- Used on the InterProlog Java side to "cascade" an interrupt over pending goals to execute
abort
public void abort()
- Used on the InterProlog Java side to "cascade" an abort over pending goals to execute
getGoal
public GoalFromJava getGoal()
prologWasCalled
public void prologWasCalled()
hasStarted
public boolean hasStarted()
hasEnded
public boolean hasEnded()
getTimestamp
public int getTimestamp()
setFirstGoalStatus
public void setFirstGoalStatus()
isFirstGoal
public boolean isFirstGoal()
toString
public String toString()
|