class Invoker {

	public WebResponse invoke(WebRequest request, MatchResult match, Handler handler) {
		try {
			Map<String, Object> parameters = createParameters(request, match, handler);
			Object value = handler.invoke(parameters);
			ResponseBuilder builder = value == null ? Response.noContent() : Response.ok(value);
			return toWebResponse(builder.build());
		} catch (Exception e) {
			logInvocationException(e);
			return toWebResponse(e);
		}
	}

	@Inject public  Invoker(GsonWebRenderer webRenderer, Logger logger);

}