protected class TAPSyncJob.SyncThread
extends java.lang.Thread
Thread which will process the job execution.
Actually, it will basically just call ADQLExecutor.start(Thread, String, TAPParameters, HttpServletResponse)
with the given ADQLExecutor
and TAP parameters (containing the ADQL query to execute).
Modifier and Type | Field and Description |
---|---|
protected java.lang.Throwable |
exception
Exception that occurs while executing this thread.
|
protected ADQLExecutor |
executor
Object knowing how to execute an ADQL query and which will execute it by calling
ADQLExecutor.start(Thread, String, TAPParameters, HttpServletResponse) . |
protected java.lang.String |
ID
ID of this thread.
|
protected TAPExecutionReport |
report
Query execution report.
|
protected javax.servlet.http.HttpServletResponse |
response
Response in which the query result must be written.
|
protected TAPParameters |
tapParams
Parameters containing the ADQL query to execute and other execution parameters/options.
|
Constructor and Description |
---|
SyncThread(ADQLExecutor executor,
java.lang.String ID,
TAPParameters tapParams,
javax.servlet.http.HttpServletResponse response)
Create a thread that will run the given executor with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getError()
Get the error that has interrupted/stopped this thread.
|
TAPExecutionReport |
getExecutionReport()
Get the report of the query execution.
|
void |
interrupt() |
boolean |
isSuccess()
Tell whether the execution has ended with success.
|
void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected final ADQLExecutor executor
ADQLExecutor.start(Thread, String, TAPParameters, HttpServletResponse)
.protected final javax.servlet.http.HttpServletResponse response
protected final java.lang.String ID
protected final TAPParameters tapParams
protected java.lang.Throwable exception
protected TAPExecutionReport report
public SyncThread(ADQLExecutor executor, java.lang.String ID, TAPParameters tapParams, javax.servlet.http.HttpServletResponse response)
executor
- Object to execute and which knows how to execute an ADQL query.ID
- ID of the synchronous job owning this thread.tapParams
- TAP parameters to use to get the query to execute and the execution parameters.response
- HTTP response in which the ADQL query result must be written.public final boolean isSuccess()
public final java.lang.Throwable getError()
public final TAPExecutionReport getExecutionReport()
public void interrupt()
interrupt
in class java.lang.Thread
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread