Package com.sun.jna.platform.win32
Class User32Util.MessageLoopThread
java.lang.Object
java.lang.Thread
com.sun.jna.platform.win32.User32Util.MessageLoopThread
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- User32Util
Helper class, that runs a windows message loop as a seperate thread.
 This is intended to be used in conjunction with APIs, that need a
 spinning message loop. One example for this are the DDE functions, that
 can only be used if a message loop is present.
 To enable interaction with the mainloop the MessageLoopThread allows to
 dispatch callables into the mainloop and let these Callables be invoked
 on the message thread.
 This implies, that the Callables should block the loop as short as possible.
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class java.lang.ThreadThread.State, Thread.UncaughtExceptionHandler
- 
Field SummaryFields inherited from class java.lang.ThreadMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidexit()protected booleanThe method is called from the thread, that run the message dispatcher, when the call toUser32.GetMessage(com.sun.jna.platform.win32.WinUser.MSG, com.sun.jna.platform.win32.WinDef.HWND, int, int)fails (returns-1).voidrun()<V> Future<V><V> VrunOnThread(Callable<V> callable) Methods inherited from class java.lang.ThreadactiveCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
- 
Constructor Details- 
MessageLoopThreadpublic MessageLoopThread()
 
- 
- 
Method Details- 
runpublic void run()
- 
runAsync
- 
runOnThread- Throws:
- Exception
 
- 
exitpublic void exit()
- 
getMessageFailedprotected boolean getMessageFailed()The method is called from the thread, that run the message dispatcher, when the call toUser32.GetMessage(com.sun.jna.platform.win32.WinUser.MSG, com.sun.jna.platform.win32.WinDef.HWND, int, int)fails (returns-1).If the method returns true, the MainLoop is exitted, if it returnsfalsethe mainloop is resumed.Default behavior: The error code is logged to the com.sun.jna.platform.win32.User32Util.MessageLoopThread logger and the main loop exists. - Returns:
- true if MainLoop should exit, false it it should resume
 
 
-