Java Reference
In-Depth Information
Figure 3-4.
Action handler sequence diagram
This is a complex interaction diagram, showing the internals of the Spring applica-
tion controller component. The different steps in this diagram are as follows:
1.
The request processing starts off with the
doService
method. It keeps a copy of the
request attributes and delegates to the
doDispatch
method for further processing.
2.
The
doDispatch
method coordinates and controls the workflow of the application
controller.
3.
The
getHandler
method is called on the dispatcher servlet to get hold of the appro-
priate handler mapping for the given request. There can be a list of handler
mappings installed with the Spring MVC runtime. This method checks the list to
select the appropriate handler mapping.
4.
Once the correct handler mapping for a given request is detected, its
getHandler
method is invoked to return an instance of
HandlerExecutionChain
.
5.
The
doDispatch
method looks for an interceptor list that has been configured
in the Spring container. However, it is not mandatory to have interceptors for
requests; it depends entirely on your requirement.
