This section provides a description of the HTML Channel classes and interfaces. See Functional units, packages, and dependencies in the Installation Guide for a list of functional units and dependencies.
The registered request handler is responsible for processing a particular request from a HTML client. The handler may need to be aware of the device type; this is managed by the channel context. The request handler performs the following tasks to integrate with the application:
▪ Establish the session between the client and the server for the specific device \
▪ Execute a generic application operation for the HTML channel
▪ Determine the appropriate presentation handler from the handler registry to render the results back to the client. For information on the handler registry,
HtmlPresentationHandler
The registered presentation handler is responsible for processing the reply to the HTML client. The main API provided by this class is void processReply(ChannelContext, ServerOperation). This starts the process of dynamically creating the HTML and rendering it to the client using the servlet JSP engine.
HtmlRequestData
This class is used by the RequestValidationServices. It encapsulates the objects that are used when processing a request from an HTML client. The objects encapsulated are the operation, the channel context, and the operation completion time.
HtmlConstants
The HtmlConstants class defines all the constants required by the HTML Channel, including the key strings that are used in contexts, hidden fields, and HttpServletRequest attributes. See the Javadoc for this class for information about these constants.
RequestValidationServices
This class provides the implementation of request validation, protecting the user from an unintentional duplicate request or a back click to a page that corresponds to a finished or expired process.
JspContextServices
This interface defines the protocol to be used by the JSP files for interaction with the context involved with the current request, to set hidden fields in the request, to support exception messages, and other related tasks.
DSEJspContextServices
This class implements JspContextServices. It can be instantiated on a JSP with the useBean tag. This class receives the operation context from the request and then extracts information from the context and emits it to the page as hidden fields. It has other methods to support exception messages, URL rewritten links, and to obtain the session and operation Context objects.
This class is a subclass of DSEServerOperation and implements the ProcessorOperation interface. DSEHtmlProcessorOperation acts as a intermediary between the channel driver handler (in this case the HtmlRequestHandler) and the Processor. This class is also responsible for calling a subsequent processor if a state is of the "subFlow" type.
HtmlProcessorManager
This class extends ProcessorManager to handle the creation and saving of the process based on the HTML Channel requirements. The instances of the processors are not kept in memory between session requests. Instead, their basic information and context are saved and the processor is reinitialized every time a request for the same processor arrives. This allows a customer to customize the solution as an environment with no server affinity.
DSEHtmlProcessor
DSEProcessor class implements a state machine and allows the externalization of a process flow. DSEHtmlProcessor extends DSEProcessor to provide additional behavior required by HTML Channel, such as the ability to update the context with a KeyedCollection with request's data, a different initialization, and the handling of a parent processor. DSEHtmlProcessor is an abstract class and needs to be subclassed with any additional behavior required.
DSEHtmlState
This class extends DSEState to handle special requirements for HTML clients. It handles the following types of states:
▪ page. When a state of type "page" is reached, control is passed back to the HtmlRequestHandler, which requests the HtmlPresentationHandler to process the reply. The page to be processed depends on the value assigned to the typeIdInfo parameter of the current state (see Flow processor definition).
▪ initial. This is the first state of the process. It should not have business behavior. The standard is to use the start event to transition to the next state. There should be only one state of this type.
▪ final. This is the last state of the process. There may be more than one final state. If the processor has a parent, the event passed to the state in which the parent processor exists depends on the value specified in the typeIdInfo parameter of the state. If it has no parent, the home page is shown.
▪ default. This state occurs when the specified actions are executed with the standard behavior. This type is used if the type is not defined.
▪ subFlow. This state starts the execution of another process. The processor to be run is defined in the typeIdInfo parameter of the subFlow state. Control is passed to the DSEHtmlProcessorOperation, which executes the specified processor.
HtmlProcessorInfo
The HtmlProcessorInfo class is a data holder for the processor's name, the current state, and the ID of the parent processor if it exists. A "processorTable" hashtable is created in the session context with the processorId as key and the HtmlProcessorInfo as value.
ProcessorOperation (interface)
The APIs for a ProcessorOperation class defined by this interface are execute(String eventName), updateContext(KeyedCollection requestDataKColl), and the getter and setter for the processor object. The eventName passed is extracted from the request. There needs to be coordination between the creation of the JSP and the externalized definition of the process. For more information refer to the Flow processor example.
ProcessorXValidate (interface)
The API for a ProcessorOperation class defined by this interface is xValidate( Context, String).
The channel context provides a single object reference that contains all the required information as it is passed between the registered handlers for the lifetime of the request. This object is used to create a thread-safe design so that no other multichannel support objects are required to maintain state.
HandlerRegistry
This singleton class provides a thread-safe registry of the mandatory presentation and request handlers that are required by each device that is implemented by the multichannel interface. This eliminates the overhead required for the object creation for each request.