org.apache.wicket.jmx
Class RequestLogger

java.lang.Object
  extended by org.apache.wicket.jmx.RequestLogger
All Implemented Interfaces:
RequestLoggerMBean

public class RequestLogger
extends Object
implements RequestLoggerMBean

Exposes RequestLogger for JMX.

Author:
eelcohillenius

Constructor Summary
RequestLogger(Application application)
          Construct.
 
Method Summary
 Integer getNumberOfCreatedSessions()
          Total number of sessions ever created since the application was started.
 Integer getNumberOfCurrentActiveRequests()
          Gets the current active requests number
 Integer getNumberOfLiveSessions()
          Gets the (recorded) number of currently live sessions.
 Integer getPeakNumberOfActiveRequests()
          The high water mark for the number of requests being processed concurrently
 Integer 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface RequestLoggerMBean
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 interface RequestLoggerMBean
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 interface RequestLoggerMBean
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 interface RequestLoggerMBean
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 interface RequestLoggerMBean
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 interface RequestLoggerMBean
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 interface RequestLoggerMBean
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


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.