ubc.cs.JLog.Foundation
Class jPrologServiceThread

java.lang.Object
  extended by java.lang.Thread
      extended by ubc.cs.JLog.Foundation.jPrologServiceThread
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
jAPIConsultThread, jConsultSourceThread, jResetDatabaseThread, jRetryQueryThread

public class jPrologServiceThread
extends java.lang.Thread

This class provides an independant thread of execution for services using a jPrologService Prolog proof engine.

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 allow_release
           
protected  jPrologServices prolog
           
protected  jPrologServiceBroadcaster stopped
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
jPrologServiceThread(jPrologServices ps)
           
 
Method Summary
 void broadcasted_stop()
           
 jPrologServices getPrologServices()
           
 boolean isCurrentlyConsulting()
           
 void printOutput(java.lang.String s)
           
 void setAllowRelease(boolean a)
          Set the thread release state upon completion.
 void setStoppedListeners(jPrologServiceBroadcaster s)
           
 
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, run, 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

prolog

protected jPrologServices prolog

stopped

protected jPrologServiceBroadcaster stopped

allow_release

protected boolean allow_release
Constructor Detail

jPrologServiceThread

public jPrologServiceThread(jPrologServices ps)
Method Detail

getPrologServices

public jPrologServices getPrologServices()

setStoppedListeners

public void setStoppedListeners(jPrologServiceBroadcaster s)

broadcasted_stop

public void broadcasted_stop()

isCurrentlyConsulting

public boolean isCurrentlyConsulting()

setAllowRelease

public void setAllowRelease(boolean a)
Set the thread release state upon completion. By default the thread may release itself from jPrologServices when it no longer needs to use its services. If this thread is being used in sequence (i.e., is being invoked by another worker thread) then it should not initiate release, because the next thread may need Prolog Services.

Parameters:
a - true to allow thread release, false to disallow it.

printOutput

public void printOutput(java.lang.String s)