Class ComThread
- java.lang.Object
-
- com.sun.jna.platform.win32.COM.util.ComThread
-
public class ComThread extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.concurrent.ExecutorServiceexecutor(package private) java.lang.RunnablefirstTask(package private) booleanrequiresInitialisation(package private) longtimeoutMilliseconds(package private) java.lang.Thread.UncaughtExceptionHandleruncaughtExceptionHandler
-
Constructor Summary
Constructors Constructor 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)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Texecute(java.util.concurrent.Callable<T> task)protected voidfinalize()(package private) static voidsetComThread(boolean value)voidterminate(long timeoutMilliseconds)Stop the COM Thread.
-
-
-
Constructor Detail
-
ComThread
public ComThread(java.lang.String threadName, long timeoutMilliseconds, java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
-
ComThread
public ComThread(java.lang.String threadName, long timeoutMilliseconds, java.lang.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 java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
setComThread
static void setComThread(boolean value)
-
execute
public <T> T execute(java.util.concurrent.Callable<T> task) throws java.util.concurrent.TimeoutException, java.lang.InterruptedException, java.util.concurrent.ExecutionException- Throws:
java.util.concurrent.TimeoutExceptionjava.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
-