ex6_49.txt
来自「j2ee core design patterns」· 文本 代码 · 共 34 行
TXT
34 行
Example 6.49 SOAP Message Handling Strategy
public class FrontController extends HttpServlet {
protected void processRequest(
HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {
// Create ApplicationController for handling incoming request
ApplicationControllerFactory ACFactory =
ApplicationControllerFactory.getInstance();
ApplicationController applicationController =
ACFactory.getApplicationController(request);
applicationController.init();
// Create ContextObject to encapsulate protocol-specific
//request state
RequestContextFactory requestContextFactory =
RequestContextFactory.getInstance();
RequestContext requestContext =
requestContextFactory.getRequestContext(request);
// Action Management - Locate & Invoke Actions to handle
//specific Requests
ResponseContext responseContext;
responseContext =
applicationController.handleRequest(requestContext);
responseContext.setResponse(response);
// View Management - Navigate and Dispatch to appropriate View
applicationController.handleResponse(
requestContext, responseContext);
applicationController.destroy();
}
. . .
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?