ubc.cs.JLog.Foundation
Class jConsultAndQueryThread

java.lang.Object
  extended by java.lang.Thread
      extended by ubc.cs.JLog.Foundation.jPrologServiceThread
          extended by ubc.cs.JLog.Foundation.jRetryQueryThread
              extended by ubc.cs.JLog.Foundation.jConsultAndQueryThread
All Implemented Interfaces:
java.lang.Runnable

public class jConsultAndQueryThread
extends jRetryQueryThread

This class implements a prolog consult, followed by a query. The source is a TextArea, as is the error output.

Author:
Glendon Holst

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  boolean in_consult_phase
           
 
Fields inherited from class ubc.cs.JLog.Foundation.jPrologServiceThread
allow_release, prolog, stopped
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
jConsultAndQueryThread(jPrologServices ps, iPrologServiceText s, java.io.PrintWriter e, iPrologServiceText qin, java.io.PrintWriter o)
           
 
Method Summary
 boolean isCurrentlyConsulting()
           
 void printOutput(java.lang.String s)
          Displays errors and other output that results from consulting the source.
 void retry()
           
 void run()
          Performs and controls the entire consultation phase.
 void setListeners(jPrologServiceBroadcaster c_b, jPrologServiceBroadcaster c_e, jPrologServiceBroadcaster q_b, jPrologServiceBroadcaster q_r, jPrologServiceBroadcaster q_e, jPrologServiceBroadcaster q_d, jPrologServiceBroadcaster s)
           
 
Methods inherited from class ubc.cs.JLog.Foundation.jPrologServiceThread
broadcasted_stop, getPrologServices, setAllowRelease, setStoppedListeners
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

in_consult_phase

protected boolean in_consult_phase
Constructor Detail

jConsultAndQueryThread

public jConsultAndQueryThread(jPrologServices ps,
                              iPrologServiceText s,
                              java.io.PrintWriter e,
                              iPrologServiceText qin,
                              java.io.PrintWriter o)
Method Detail

setListeners

public void setListeners(jPrologServiceBroadcaster c_b,
                         jPrologServiceBroadcaster c_e,
                         jPrologServiceBroadcaster q_b,
                         jPrologServiceBroadcaster q_r,
                         jPrologServiceBroadcaster q_e,
                         jPrologServiceBroadcaster q_d,
                         jPrologServiceBroadcaster s)

run

public void run()
Performs and controls the entire consultation phase.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

isCurrentlyConsulting

public boolean isCurrentlyConsulting()
Overrides:
isCurrentlyConsulting in class jPrologServiceThread

retry

public void retry()
Specified by:
retry in class jRetryQueryThread

printOutput

public void printOutput(java.lang.String s)
Displays errors and other output that results from consulting the source.

Overrides:
printOutput in class jPrologServiceThread
Parameters:
s - the input string to append to errors.