use of com.google.gwtjsonrpc.server.MethodHandle in project gerrit by GerritCodeReview.
the class GerritJsonServlet method audit.
private void audit() {
try {
GerritCall call = currentCall.get();
MethodHandle method = call.getMethod();
if (method == null) {
return;
}
Audit note = method.getAnnotation(Audit.class);
if (note != null) {
String sid = call.getWebSession().getSessionId();
CurrentUser username = call.getWebSession().getUser();
ListMultimap<String, ?> args = extractParams(note, call);
String what = extractWhat(note, call);
Object result = call.getResult();
audit.dispatch(new RpcAuditEvent(sid, username, what, call.getWhen(), args, call.getHttpServletRequest().getMethod(), call.getHttpServletRequest().getMethod(), ((AuditedHttpServletResponse) (call.getHttpServletResponse())).getStatus(), result));
}
} catch (Throwable all) {
log.error("Unable to log the call", all);
}
}
Aggregations