Search in sources :

Example 16 with Stopwatch

use of org.n52.web.common.Stopwatch in project arctic-sea by 52North.

the class Service method post.

@RequestMapping(method = RequestMethod.POST)
public void post(HttpServletRequest request, HttpServletResponse response) throws IOException {
    Stopwatch stopwatch = Stopwatch.createStarted();
    long currentCount = logRequest(request);
    try {
        getBinding(request).doPostOperation(request, response);
    } catch (HTTPException exception) {
        onHttpException(request, response, exception);
    } finally {
        logResponse(request, response, currentCount, stopwatch);
    }
}
Also used : HTTPException(org.n52.iceland.exception.HTTPException) Stopwatch(com.google.common.base.Stopwatch) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

Stopwatch (org.n52.web.common.Stopwatch)10 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)9 IoParameters (org.n52.io.request.IoParameters)8 Stopwatch (com.google.common.base.Stopwatch)5 HTTPException (org.n52.iceland.exception.HTTPException)5 ModelAndView (org.springframework.web.servlet.ModelAndView)4 HashMap (java.util.HashMap)2 ResourceNotFoundException (org.n52.web.exception.ResourceNotFoundException)2 JobDataMap (org.quartz.JobDataMap)2 JobDetail (org.quartz.JobDetail)2 Binding (org.n52.iceland.binding.Binding)1 OutgoingResponseEvent (org.n52.iceland.event.events.OutgoingResponseEvent)1 RenderingConfig (org.n52.io.PrerenderingJobConfig.RenderingConfig)1 GeneralizingQuantityService (org.n52.io.quantity.generalize.GeneralizingQuantityService)1 Data (org.n52.io.response.dataset.Data)1 QuantityData (org.n52.io.response.dataset.quantity.QuantityData)1 RenderingConfig (org.n52.io.task.PreRenderingConfig.RenderingConfig)1 GeneralizingQuantityService (org.n52.io.type.quantity.generalize.GeneralizingQuantityService)1 OffsetBasedPagination (org.n52.web.common.OffsetBasedPagination)1 Paginated (org.n52.web.common.Paginated)1