public class ComThread
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) java.util.concurrent.ExecutorService |
executor |
(package private) java.lang.Runnable |
firstTask |
(package private) boolean |
requiresInitialisation |
(package private) long |
timeoutMilliseconds |
(package private) java.lang.Thread.UncaughtExceptionHandler |
uncaughtExceptionHandler |
Constructor and Description |
---|
ComThread(java.lang.String threadName,
long timeoutMilliseconds,
java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler) |
ComThread(java.lang.String threadName,
long timeoutMilliseconds,
java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler,
int coinitialiseExFlag) |
Modifier and Type | Method and Description |
---|---|
<T> T |
execute(java.util.concurrent.Callable<T> task) |
protected void |
finalize() |
(package private) static void |
setComThread(boolean value) |
void |
terminate(long timeoutMilliseconds)
Stop the COM Thread.
|
java.util.concurrent.ExecutorService executor
java.lang.Runnable firstTask
boolean requiresInitialisation
long timeoutMilliseconds
java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler
public ComThread(java.lang.String threadName, long timeoutMilliseconds, java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
public ComThread(java.lang.String threadName, long timeoutMilliseconds, java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler, int coinitialiseExFlag)
public void terminate(long timeoutMilliseconds)
timeoutMilliseconds
- number of milliseconds to wait for a clean shutdown before a
forced shutdown is attemptedprotected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
static void setComThread(boolean value)
public <T> T execute(java.util.concurrent.Callable<T> task) throws java.util.concurrent.TimeoutException, java.lang.InterruptedException, java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
java.lang.InterruptedException
java.util.concurrent.ExecutionException