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 TypeMethodDescriptionvoiddestroy()used to get next program to run.booleanFor benefit of conversational CICSvoidput program to sleep, and pass control to user ...voidPass 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:
wakeUpToProgramin classScreenServer
-
switchToUser
public void switchToUser()put program to sleep, and pass control to user ... waiting for next key entry- Specified by:
switchToUserin classScreenServer
-
getTargetInstance
used to get next program to run.- Specified by:
getTargetInstancein classScreenServer- Returns:
-
destroy
public void destroy() -
hasQuitedCics
public boolean hasQuitedCics()Description copied from class:ScreenServerFor benefit of conversational CICS- Overrides:
hasQuitedCicsin classScreenServer- Returns:
-