@Override public void postCall(HttpRequest request, HttpResponseStatus status, HandlerInfo handlerInfo) { Method method = handlerInfo.getMethod(); Interceptor interceptor = map.get(method); if (interceptor != null) { interceptor.postCall(request, status, handlerInfo); } }
@Override public boolean preCall(HttpRequest request, HttpResponder responder, HandlerInfo handlerInfo) { Method method = handlerInfo.getMethod(); Interceptor interceptor = map.get(method); if (interceptor == null) { if (method.isAnnotationPresent(HTTPMonitoring.class) || method.getDeclaringClass().isAnnotationPresent(HTTPMonitoring.class)) { interceptor = new HTTPInterceptor(); map.put(method, interceptor); } } if (interceptor != null) { interceptor.preCall(request, responder, handlerInfo); } return true; }