List of usage examples for org.apache.wicket.protocol.http IRequestLogger getPeakSessions
int getPeakSessions();
From source file:fiftyfive.wicket.util.LoggingUtils.java
License:Apache License
/** * Returns a string that describes the active sessions in this format: * {@code 5 (16 peak)}. This information comes from the application's * {@link IRequestLogger}. If the logger is not enabled, returns * {@code null}./* ww w.j a v a2 s.c o m*/ */ public static String describeActiveSessions() { IRequestLogger log = Application.get().getRequestLogger(); if (null == log) return null; SessionData[] sessions = log.getLiveSessions(); if (null == sessions) return null; return String.format("%d (%d peak)", sessions.length, log.getPeakSessions()); }