The basic dynamic behavior of this mechanism is shown in Figure C-7. In this sequence diagram, the client browser requests a page resource. The RequestProcessor handles this request and delegates the processing of any input dataURL parameters or form datato the current active controller. If this is the first page request, a new instance of the default controller is created and made currently active. The processor then requests the next page resource to load, execute, and send back to the client browser.
Figure C-7. Basic flow use case realization
The Figure C-8 sequence diagram shows how the request processor and the coordinator add a controller to the active stack. In this scenario, the request processor examines the incoming request for a parameter that indicates a new controller request. Before invoking the new controller, the request processor makes sure that the current controller doesn't require exclusive control. If it doesn't, the new controller is made current and active and given the input request for processing. The new controller now is the current active controller.
Figure C-8. New Controller use case realization
In Figure C-9, the current controller indicates that it is finished and that the coordinator can remove it from being active. The next controller in the stack is now returned to active and current status and is given the input request, which it most likely will ignore, and asked which page to load and send to the client. The overall flow of this mechanism is shown in Figure C-10.
Figure C-9. Remove Controller use case realization
Figure C-10. Activity diagram summarizing mechanism
Overview of Modeling and Web-Related Technologies
Building Web Applications