Class EventProcessingThreadImpl

  • All Implemented Interfaces:
    java.lang.Runnable, EventProcessingThread

    public class EventProcessingThreadImpl
    extends java.lang.Thread
    implements EventProcessingThread
    Thread to handle events. We need to handle events in a separate thread, because it might suspend (by calling UiEngine.wait(java.lang.Object)), such as waiting a modal dialog to complete.
    Author:
    tomyeh
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cease​(java.lang.String cause)
      Stops the thread.
      void ceaseSilently​(java.lang.String cause)
      Stops the thread silently.
      boolean doResume()
      Resumes this thread and returns only if the execution (being suspended by doSuspend(java.lang.Object)) completes.
      static void doSuspend​(java.lang.Object mutex)
      Suspends the current thread and Waits until doResume() is called.
      Component getComponent()
      Returns the component being processed by this thread, or null if idle.
      Event getEvent()
      Returns the event being processed by this thread, or null if idle.
      static int getThreadNumber()
      Returns the number of event threads.
      static int getThreadNumberInProcessing()
      Returns the number of event threads in processing.
      boolean isCeased()
      Returns whether it is ceased.
      boolean isIdle()
      Returns whether this thread is idle, i.e., not processing any event.
      boolean isSuspended()
      Returns whether it is suspended.
      void newEventThreadSuspends​(java.lang.Object mutex)
      boolean processEvent​(Desktop desktop, Component comp, Event event)
      Ask this event thread to process the specified event.
      void run()  
      void sendEvent​(Component comp, Event event)
      Sends the specified component and event and processes the event synchronously.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Thread

        activeCount, 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, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait