Class ThreadMultiplexor

java.lang.Object
com.softwaremining.ui.ScreenServer
com.softwaremining.ui.web.socket.ThreadMultiplexor
All Implemented Interfaces:
Runnable

public class ThreadMultiplexor extends ScreenServer
Extends the abstract class "SocketScreenServer". The HTTP Servlet creates a new ThreadMultiplexor for each incoming session. This class will then manage the launch of the application, and the communication (ACCEPT/DISPLAY) between the instance of application and the HTTP session. It works by starting a TCP Client/Server on a random port. It uses the TCP communication for control (wait) states and for communications. The main methods "wakeUpToProgram" and "switchToUser" will pass control between application and user
  • Constructor Details

    • ThreadMultiplexor

      public ThreadMultiplexor(com.softwaremining.ui.web.socket.Waiter userWaiter, Service target, AbstractScreen screen)
      Parameters:
      userWaiter - - notification system
      target - - the program to run
      screen - - screen handling elements
  • Method Details

    • wakeUpToProgram

      public void wakeUpToProgram()
      Pass control back to program
      Specified by:
      wakeUpToProgram in class ScreenServer
    • switchToUser

      public void switchToUser()
      put program to sleep, and pass control to user ... waiting for next key entry
      Specified by:
      switchToUser in class ScreenServer
    • getTargetInstance

      public Service getTargetInstance()
      used to get next program to run.
      Specified by:
      getTargetInstance in class ScreenServer
      Returns:
    • destroy

      public void destroy()
    • hasQuitedCics

      public boolean hasQuitedCics()
      Description copied from class: ScreenServer
      For benefit of conversational CICS
      Overrides:
      hasQuitedCics in class ScreenServer
      Returns: