protected static class GlobalScreen.NativeHookThread extends Thread
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected NativeHookException |
exception
Exception thrown by this thread.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
GlobalScreen.NativeHookThread()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disable()
Native implementation to stop the input hook.
|
protected static void |
dispatchEvent(NativeInputEvent event)
Dispatches an event to the appropriate processor.
|
protected void |
enable()
Native implementation to start the input hook.
|
NativeHookException |
getException()
Get the exception associated with the current hook, or null of no exception was thrown.
|
void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected NativeHookException exception
public GlobalScreen.NativeHookThread()
public NativeHookException getException()
NativeHookException or null.protected void enable()
throws NativeHookException
NativeHookException - problem registering the native hook with the underlying operating system.public void disable()
throws NativeHookException
NativeHookException - problem un-registering the native hook with the underlying operating system.protected static void dispatchEvent(NativeInputEvent event)
GlobalScreen.postNativeEvent(org.jnativehook.NativeInputEvent),
Note: This method executes on the native system's event queue. It is imperative that all processing be off-loaded to other threads. Failure to do so might result in the delay of user input and the automatic removal of the native hook.
event - the NativeInputEvent sent to the registered event listeners.Copyright © 2006-2017 ${project.vendor}. All Rights Received.