Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-05


oracle.adf.view.rich.monitoring
Class EndUserMonitoringService

java.lang.Object
  extended by oracle.adf.view.rich.monitoring.EndUserMonitoringService


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.

See Also:
AdfFacesContext.getEndUserMonitoringService()

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 context and request.
abstract  void logUserActivity(UserActivityInfo userActivityInfo)
          Logs user activity information, associated with 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

EndUserMonitoringService

protected EndUserMonitoringService()
Creates a EndUserMonitoringService

Method Detail

logUserActivity

public abstract void logUserActivity(UserActivityInfo userActivityInfo)
Logs user activity information, associated with a user action in a previous request. Each user action is associated with an ExecutionContext and identified by it's 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 primary requests, the user activity information for the first (or any request) is logged both when processing that request on the server and during the processing of the second (or subsequent) request. For instance the client end time is calculated on the client at the end of processing the response for the first request on the client and this information is sent to the server as part of the payload of the second request (to avoid unnecessary requests).

So, for the current request,
  1. If on 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, the method logUserActivity(Object request, UserActivityInfo userActInfo) is always called.
    For secondary requests 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 provided.
Parameters:
userActivityInfo - the user activity info specific to the previous request.

logUserActivity

public abstract void logUserActivity(java.lang.Object request,
                                     UserActivityInfo userActivityInfo)
Logs information for the current context and request. This method will be called at various times, including when a new request comes into the server (primary and secondary requests).
  1. For primary requests this method is called with a UserActivityInfo object containing the following information,
    • viewId of the current page.
    • windowId of the current windowId that initiated this request. (to distinguish results from multiple windows in the same session).
    • EventInfo of the event that triggered this request. Null if this request was triggered by an attribute change for instance.
    • client start time (null for the first request for the current session). The client start time is sent across to handle the case, when the current event causes a full page refresh)
    • list of ErrorInfo objects, that are the errors encountered on the client prior to the current request
    • List of pprTarget clientIds.
    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.
  2. For a secondary request (associated to the primary), this method (may) be called whenever a new thread is spawned for a 'data stream fetch'. A new child context will be automatically created and subclasses can retrieve the context id of the parent and its child.
Parameters:
request - the environment-specific object instance for the current request.
See Also:
UserActivityInfo

isMonitoringServiceEnabled

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 (11.1.1)
E10684-05


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