Class ComThread
- java.lang.Object
-
- com.sun.jna.platform.win32.COM.util.ComThread
-
public class ComThread extends Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ExecutorService
executor
(package private) Runnable
firstTask
(package private) boolean
requiresInitialisation
(package private) long
timeoutMilliseconds
(package private) Thread.UncaughtExceptionHandler
uncaughtExceptionHandler
-
Constructor Summary
Constructors Constructor Description ComThread(String threadName, long timeoutMilliseconds, Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
ComThread(String threadName, long timeoutMilliseconds, Thread.UncaughtExceptionHandler uncaughtExceptionHandler, int coinitialiseExFlag)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
execute(Callable<T> task)
protected void
finalize()
(package private) static void
setComThread(boolean value)
void
terminate(long timeoutMilliseconds)
Stop the COM Thread.
-
-
-
Field Detail
-
executor
ExecutorService executor
-
firstTask
Runnable firstTask
-
requiresInitialisation
boolean requiresInitialisation
-
timeoutMilliseconds
long timeoutMilliseconds
-
uncaughtExceptionHandler
Thread.UncaughtExceptionHandler uncaughtExceptionHandler
-
-
Constructor Detail
-
ComThread
public ComThread(String threadName, long timeoutMilliseconds, Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
-
ComThread
public ComThread(String threadName, long timeoutMilliseconds, Thread.UncaughtExceptionHandler uncaughtExceptionHandler, int coinitialiseExFlag)
-
-
Method Detail
-
terminate
public void terminate(long timeoutMilliseconds)
Stop the COM Thread.- Parameters:
timeoutMilliseconds
- number of milliseconds to wait for a clean shutdown before a forced shutdown is attempted
-
finalize
protected void finalize() throws Throwable
-
setComThread
static void setComThread(boolean value)
-
execute
public <T> T execute(Callable<T> task) throws TimeoutException, InterruptedException, ExecutionException
-
-