Interface UIThreadListener


  • public interface UIThreadListener
    A listener that is notified whenever a session enters the UI thread to process events and when it leaves the UI thread again. Since SWT widgets can only be accessed from the UI thread, it is guaranteed that all UI code will be executed between enterUIThread and leaveUIThread. This listener will always be called in the UIThread.

    In a RAP application, the UI thread is entered when a client request hits the server, e.g. after some user interaction. When all pending events are processed, the UI thread is left and the response goes back to the client. This listener can be used to track activity or to set up and tear down a context such as a database connection.

    Since:
    3.1
    • Method Detail

      • enterUIThread

        void enterUIThread​(UISessionEvent event)
        Called when a UISession has entered the UI thread to process events.
        Parameters:
        event - an event that provides access to the UI session
      • leaveUIThread

        void leaveUIThread​(UISessionEvent event)
        Called when a UISession has processed all pending events and is about to leave the UI thread.
        Parameters:
        event - an event that provides access to the UI session