001package org.javasimon.spring.webmvc; 002 003import javax.servlet.http.HttpServletRequest; 004 005import org.javasimon.Split; 006 007import org.springframework.web.servlet.ModelAndView; 008 009/** 010 * Location used by stopwatch source for MVC Handler interceptor. 011 * Basically, represents a Controller method invocation. 012 * 013 * @author gquintana 014 */ 015public class HandlerLocation { 016 /** 017 * HTTP Servlet Request. 018 */ 019 private final HttpServletRequest request; 020 021 /** 022 * Handler (controller method invocation). 023 */ 024 private final Object handler; 025 026 /** 027 * Request processing step: controller processing org view rendering. 028 */ 029 private HandlerStep step; 030 031 /** 032 * View (and Model, null when step is not VIEW. 033 */ 034 private ModelAndView modelAndView; 035 036 /** 037 * Currently running split. 038 */ 039 private Split split; 040 041 public HandlerLocation(HttpServletRequest request, Object handler, HandlerStep step) { 042 this.request = request; 043 this.handler = handler; 044 this.step = step; 045 } 046 047 public Object getHandler() { 048 return handler; 049 } 050 051 public HttpServletRequest getRequest() { 052 return request; 053 } 054 055 public ModelAndView getModelAndView() { 056 return modelAndView; 057 } 058 059 public void setModelAndView(ModelAndView modelAndView) { 060 this.modelAndView = modelAndView; 061 } 062 063 public HandlerStep getStep() { 064 return step; 065 } 066 067 public void setStep(HandlerStep step) { 068 this.step = step; 069 } 070 071 public Split getSplit() { 072 return split; 073 } 074 075 public void setSplit(Split split) { 076 this.split = split; 077 } 078 079}