public class ExecutorThread
extends java.lang.Object
implements java.lang.Runnable
Monitor the asynchronous connection's task queue and execute tasks one by one over a synchronous connection.
Constructor and Description |
---|
ExecutorThread(TaskQueue taskQueue)
Construct an instance of the executor thread that
performs tasks one by one from the taskQueue.
|
Modifier and Type | Method and Description |
---|---|
void |
run()
Manage the execution of tasks from the task queue.
|
public ExecutorThread(TaskQueue taskQueue) throws DBConnectionException
taskQueue
- List of Tasks that need to be executed.DBConnectionException
- - When we face a problem
while creating a database connection. These problems could
be that configured connection class does not exist,
the path for the database is not found, the container name
is incorrect, the connection to the database
could not be established etc.public void run()
It aborts its working if it encounter an exception or if the processing error flag in the taskQueue is set to true.
Stop execution if the taskQueue is completed and all the tasks are executed or if it exceeds its max wait time of 50 seconds.
run
in interface java.lang.Runnable