Package org.apache.wicket.jmx.wrapper
Class RequestLogger
- java.lang.Object
-
- org.apache.wicket.jmx.wrapper.RequestLogger
-
- All Implemented Interfaces:
RequestLoggerMBean
public class RequestLogger extends Object implements RequestLoggerMBean
ExposesRequestLoggerfor JMX.- Author:
- eelcohillenius
-
-
Constructor Summary
Constructors Constructor Description RequestLogger(org.apache.wicket.Application application)Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetNumberOfCreatedSessions()Total number of sessions ever created since the application was started.IntegergetNumberOfCurrentActiveRequests()Gets the current active requests numberIntegergetNumberOfLiveSessions()Gets the (recorded) number of currently live sessions.IntegergetPeakNumberOfActiveRequests()The high water mark for the number of requests being processed concurrentlyIntegergetPeakNumberOfSessions()The largest number of concurrent sessions since the application was started.protected org.apache.wicket.protocol.http.IRequestLoggergetRequestLogger()Gets the request logger for this application.voidrestart()Registers a new request logger at the application.voidstop()Removes any set request logger from the application.
-
-
-
Constructor Detail
-
RequestLogger
public RequestLogger(org.apache.wicket.Application application)
Construct.- Parameters:
application- The application
-
-
Method Detail
-
getNumberOfCreatedSessions
public Integer getNumberOfCreatedSessions() throws IOException
Description copied from interface:RequestLoggerMBeanTotal number of sessions ever created since the application was started.Only available for
web applications.- Specified by:
getNumberOfCreatedSessionsin interfaceRequestLoggerMBean- Returns:
- the total number of sessions ever created since the application was started
- Throws:
IOException- See Also:
RequestLoggerMBean.getNumberOfCreatedSessions()
-
getNumberOfLiveSessions
public Integer getNumberOfLiveSessions() throws IOException
Description copied from interface:RequestLoggerMBeanGets the (recorded) number of currently live sessions.Only available for
web applications.- Specified by:
getNumberOfLiveSessionsin interfaceRequestLoggerMBean- Returns:
- current (recorded) number of live sessions
- Throws:
IOException- See Also:
RequestLoggerMBean.getNumberOfLiveSessions()
-
getPeakNumberOfSessions
public Integer getPeakNumberOfSessions() throws IOException
Description copied from interface:RequestLoggerMBeanThe largest number of concurrent sessions since the application was started.Only available for
web applications.- Specified by:
getPeakNumberOfSessionsin interfaceRequestLoggerMBean- Returns:
- the largest number of concurrent sessions since the application was started
- Throws:
IOException- See Also:
RequestLoggerMBean.getPeakNumberOfSessions()
-
getNumberOfCurrentActiveRequests
public Integer getNumberOfCurrentActiveRequests() throws IOException
Description copied from interface:RequestLoggerMBeanGets the current active requests number- Specified by:
getNumberOfCurrentActiveRequestsin interfaceRequestLoggerMBean- Returns:
- current (at the time of method invocation) number of concurrent request being processed
- Throws:
IOException- See Also:
RequestLoggerMBean.getNumberOfCurrentActiveRequests()
-
getPeakNumberOfActiveRequests
public Integer getPeakNumberOfActiveRequests() throws IOException
Description copied from interface:RequestLoggerMBeanThe high water mark for the number of requests being processed concurrently- Specified by:
getPeakNumberOfActiveRequestsin interfaceRequestLoggerMBean- Returns:
- the largest number of the concurrent requests being processed
- Throws:
IOException- See Also:
RequestLoggerMBean.getPeakNumberOfActiveRequests()
-
restart
public void restart() throws IOException
Description copied from interface:RequestLoggerMBeanRegisters a new request logger at the application. You need a request logger for some functions of the session bean. Be aware that sessions will be logged from this time on, so they may not reflect the actual number of sessions. Also, if one was registered, it will be replaced by a new one, which then starts over counting, disregarding the current ones.Only available for
web applications.- Specified by:
restartin interfaceRequestLoggerMBean- Throws:
IOException- See Also:
RequestLoggerMBean.restart()
-
stop
public void stop() throws IOException
Description copied from interface:RequestLoggerMBeanRemoves any set request logger from the application. You need a request logger for some functions of the session bean.Only available for
web applications.- Specified by:
stopin interfaceRequestLoggerMBean- Throws:
IOException- See Also:
RequestLoggerMBean.stop()
-
getRequestLogger
protected org.apache.wicket.protocol.http.IRequestLogger getRequestLogger()
Gets the request logger for this application.- Returns:
- The request logger or null if no request is active, or if this is not a web application
-
-