}
RepositoryContext context = (RepositoryContext)
getServletContext().getAttribute(name);
if (context != null) {
RepositoryStatistics statistics = context.getRepositoryStatistics();
response.setContentType("application/json");
Writer writer = response.getWriter();
writer.write('{');
write(writer, "read", statistics.getTimeSeries(
RepositoryStatistics.Type.SESSION_READ_COUNTER));
writer.write(',');
write(writer, "write", statistics.getTimeSeries(
RepositoryStatistics.Type.SESSION_WRITE_COUNTER));
writer.write(',');
write(writer, "login", statistics.getTimeSeries(
RepositoryStatistics.Type.SESSION_LOGIN_COUNTER));
writer.write('}');
} else {
response.sendError(
HttpServletResponse.SC_INTERNAL_SERVER_ERROR,