Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (
Class EndUserMonitoringService

  extended by

public abstract class EndUserMonitoringService
extends java.lang.Object

The EndUserMonitoringService class provides the ability to log performance data for every user initiated action on a page. The performance metric being measured is a 'click-to-render' time, which includes all processing from the time the user performs an action on the browser (client) to the time the web application completes processing it and updates the browser with the results.
The instance of this class is shared across the entire application. An EndUserMonitoringService can be registered by adding a service file with a class name at META-INF/services/

See Also:

Constructor Summary
protected EndUserMonitoringService()
          Creates a EndUserMonitoringService


Method Summary
 boolean isMonitoringServiceEnabled()
          Whether a monitoring service is enabled.
abstract  void logUserActivity(java.lang.Object request, UserActivityInfo userActivityInfo)
          Logs information for the current request.
abstract  void logUserActivity(UserActivityInfo userActivityInfo)
          Logs user activity information for a user action in a previous request.


Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait


Constructor Detail


protected EndUserMonitoringService()
Creates a EndUserMonitoringService

Method Detail


public abstract void logUserActivity(UserActivityInfo userActivityInfo)
Logs user activity information for a user action in a previous request. Each user action is associated with an ExecutionContext and identified by its context id. This identifier is used to correlate log records associated with a single user action. The scenarios under which this method is called are as follows.

For any request, the user activity information is logged both when the request is processed on the server and during the processing of the subsequent request. For instance the client end time is calculated on the client-side at the end of processing the response for the first request and this information is sent to the server as part of the payload of the subsequent request (to avoid unnecessary requests).

So, for the current request,
  1. If for the current request, data for the previous request is available, this method is called with a UserActivityInfo object containing the following information:
    • contextId of previous request
    • client start time
    • client end time
  2. When logging information for the current request that is being processed, the method logUserActivity(Object request, UserActivityInfo userActInfo) is always called.
    For the secondary request associated to a primary, typically a result of data streaming, the client end time is calculated when all streaming completes. This will be the end time for the primary request that launched the secondary request. The data will be similar as explained above for the primary request.
  3. Tracking client times for every secondary request (or every data fetch/stream) within a primary request is not supported.
userActivityInfo - the user activity info specific to the previous request.


public abstract void logUserActivity(java.lang.Object request,
                                     UserActivityInfo userActivityInfo)
Logs information for the current request. This method will be called at various times, especially when a new request comes into the server or when new information is available to be logged for the current request.
  1. For primary requests this method is called with a UserActivityInfo object containing the following information,
    • client start time (null for the first request for the current session).
    • contextId for the current request
    • EventInfo of the event that triggered this request. Null if this request was triggered by an attribute change for instance.
    • list of ErrorInfo objects, that are the errors encountered on the client prior to the current request
    • list of pprTarget clientIds.
    • redirectLocation / redirectStatusCode - if the current PPR request is about to cause a redirect on the client then the
    • viewId of the current page.
    • windowId of the current windowId that initiated this request. (to distinguish results from multiple windows in the same session).
    NOTE: The implementation can retrieve the context id from the current thread's ExecutionContext. In order for implementations to access a component (using the PPR target clientId or the target component for the event), this call will be made after component tree has been built.
request - the environment-specific object instance for the current request.
See Also:


public boolean isMonitoringServiceEnabled()
Whether a monitoring service is enabled. The default implementation returns false, so subclasses will need to override this method to explicitly turn monitoring on.

Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (

Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.