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
ExposesRequestLogger
for JMX.- Author:
- eelcohillenius
-
-
Constructor Summary
Constructors Constructor Description RequestLogger(Application application)
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getNumberOfCreatedSessions()
Total number of sessions ever created since the application was started.Integer
getNumberOfCurrentActiveRequests()
Gets the current active requests numberInteger
getNumberOfLiveSessions()
Gets the (recorded) number of currently live sessions.Integer
getPeakNumberOfActiveRequests()
The high water mark for the number of requests being processed concurrentlyInteger
getPeakNumberOfSessions()
The largest number of concurrent sessions since the application was started.protected IRequestLogger
getRequestLogger()
Gets the request logger for this application.void
restart()
Registers a new request logger at the application.void
stop()
Removes any set request logger from the application.
-
-
-
Constructor Detail
-
RequestLogger
public RequestLogger(Application application)
Construct.- Parameters:
application
- The application
-
-
Method Detail
-
getNumberOfCreatedSessions
public Integer getNumberOfCreatedSessions() throws IOException
Description copied from interface:RequestLoggerMBean
Total number of sessions ever created since the application was started.Only available for
web applications
.- Specified by:
getNumberOfCreatedSessions
in 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:RequestLoggerMBean
Gets the (recorded) number of currently live sessions.Only available for
web applications
.- Specified by:
getNumberOfLiveSessions
in interfaceRequestLoggerMBean
- Returns:
- current (recorded) number of live sessions
- Throws:
IOException
- See Also:
RequestLoggerMBean.getNumberOfLiveSessions()
-
getPeakNumberOfSessions
public Integer getPeakNumberOfSessions() throws IOException
Description copied from interface:RequestLoggerMBean
The largest number of concurrent sessions since the application was started.Only available for
web applications
.- Specified by:
getPeakNumberOfSessions
in 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:RequestLoggerMBean
Gets the current active requests number- Specified by:
getNumberOfCurrentActiveRequests
in 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:RequestLoggerMBean
The high water mark for the number of requests being processed concurrently- Specified by:
getPeakNumberOfActiveRequests
in 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:RequestLoggerMBean
Registers 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:
restart
in interfaceRequestLoggerMBean
- Throws:
IOException
- See Also:
RequestLoggerMBean.restart()
-
stop
public void stop() throws IOException
Description copied from interface:RequestLoggerMBean
Removes 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:
stop
in interfaceRequestLoggerMBean
- Throws:
IOException
- See Also:
RequestLoggerMBean.stop()
-
getRequestLogger
protected 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
-
-