Package com.softwaremining.ui.web.socket
Class ThreadMultiplexor
java.lang.Object
com.softwaremining.ui.ScreenServer
com.softwaremining.ui.web.socket.ThreadMultiplexor
- All Implemented Interfaces:
Runnable
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 Summary
ConstructorsConstructorDescriptionThreadMultiplexor
(com.softwaremining.ui.web.socket.Waiter userWaiter, Service target, AbstractScreen screen) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
used to get next program to run.boolean
For benefit of conversational CICSvoid
put program to sleep, and pass control to user ...void
Pass control back to programMethods inherited from class com.softwaremining.ui.ScreenServer
getAcceptResponse, getReturnCode, getScreen, getServiceName, run
-
Constructor Details
-
ThreadMultiplexor
public ThreadMultiplexor(com.softwaremining.ui.web.socket.Waiter userWaiter, Service target, AbstractScreen screen) - Parameters:
userWaiter
- - notification systemtarget
- - the program to runscreen
- - screen handling elements
-
-
Method Details
-
wakeUpToProgram
public void wakeUpToProgram()Pass control back to program- Specified by:
wakeUpToProgram
in classScreenServer
-
switchToUser
public void switchToUser()put program to sleep, and pass control to user ... waiting for next key entry- Specified by:
switchToUser
in classScreenServer
-
getTargetInstance
used to get next program to run.- Specified by:
getTargetInstance
in classScreenServer
- Returns:
-
destroy
public void destroy() -
hasQuitedCics
public boolean hasQuitedCics()Description copied from class:ScreenServer
For benefit of conversational CICS- Overrides:
hasQuitedCics
in classScreenServer
- Returns:
-