Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


oracle.adf.view.rich.monitoring
Class UserActivityInfo

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


public final class UserActivityInfo
extends java.lang.Object

The UserActivityInfo class holds information pertaining to a user action. This class is used for the purposes of monitoring end user activity such as start and end time for a user action initiated from the client-side.


Nested Class Summary
static class UserActivityInfo.ErrorInfo
          Represents an error object for an error that caused the request to fail.
static class UserActivityInfo.EventInfo
          Represents a primary event that triggered the request.

 

Field Summary
static java.lang.String CURR_KEY
          * Used to locate the UserActivityInfo for the curent request.
static java.lang.String PREV_KEY
          Used to locate the UserActivityInfo for the previous request.
static java.lang.String USER_ACTIVITY_INFO_REQ_PARAM
          Used to store the user activity information in the requestMap

 

Constructor Summary
UserActivityInfo(java.lang.String contextId, java.lang.String parentContextId, java.lang.String clientStartTime, java.lang.String clientEndTime)
          Creates a user activity record for the request identified by the provided contextId.
UserActivityInfo(java.lang.String viewId, java.lang.String windowId, UserActivityInfo.EventInfo eventInfo, java.lang.String clientStartTime, java.util.List<UserActivityInfo.ErrorInfo> errors, java.util.List<java.lang.String> partialTargets)
          Creates a user activity record for the current context.

 

Method Summary
 java.lang.String getClientEndTime()
          Gets the client end time.
 java.lang.String getClientStartTime()
          Gets the client start time.
 java.lang.String getContextId()
          Gets the context identifier.
 java.util.List<UserActivityInfo.ErrorInfo> getErrors()
          A list of ErrorInfo objects, representing the errors that caused the request to fail.
 UserActivityInfo.EventInfo getEventInfo()
          Gets the EventInfo object that contains the event info of the event that triggered this request.
 java.lang.String getParentContextId()
          Gets the parent's context identifier.
 java.util.List<java.lang.String> getPartialTargets()
          A list of client component ids of components that are registered as partial targets for the request.
static java.lang.String getPreviousKeyInSequence(int sequence)
          Gets the previous key to use for the specified sequence number.
 java.lang.String getRedirectLocation()
          Gets the location current request is being redirected to.
 java.lang.String getRedirectStatusCode()
          Gets the status code returned in the PPR response (header) when the current request is being redirected to the redirect location.
 java.lang.String getViewId()
          The viewId for the request.
 java.lang.String getWindowId()
          The windowId of the window that initiated the request.
 void setErrors(java.util.List<UserActivityInfo.ErrorInfo> errors)
          Sets a list of ErrorInfo objects on the UserActivityInfo instance pertaining to the current request.
 void setEventInfo(UserActivityInfo.EventInfo eventInfo)
          Sets the event information (typically) on the UserActivityInfo instance pertaining to the current request.
 void setPartialTargets(java.util.List<java.lang.String> partialTargets)
          Sets the list of partial targets on the UserActivityInfo instance pertaining to the current request.
 void setRedirectInfo(java.lang.String location, java.lang.String statusCode)
          For PPR Redirects when the client is about to be redirected to a different URL this method is called to set the location and status code.
 void setViewId(java.lang.String viewId)
          Sets the viewId on the UserActivityInfo instance pertaining to the current request.
 void setWindowId(java.lang.String windowId)
          Sets the windowId on the UserActivityInfo instance pertaining to the current request.
 java.lang.String toString()
           

 

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

 

Field Detail

USER_ACTIVITY_INFO_REQ_PARAM

public static final java.lang.String USER_ACTIVITY_INFO_REQ_PARAM
Used to store the user activity information in the requestMap
See Also:
Constant Field Values

PREV_KEY

public static final java.lang.String PREV_KEY
Used to locate the UserActivityInfo for the previous request.
See Also:
Constant Field Values

CURR_KEY

public static final java.lang.String CURR_KEY
* Used to locate the UserActivityInfo for the curent request.
See Also:
Constant Field Values

Constructor Detail

UserActivityInfo

public UserActivityInfo(java.lang.String contextId,
                        java.lang.String parentContextId,
                        java.lang.String clientStartTime,
                        java.lang.String clientEndTime)
Creates a user activity record for the request identified by the provided contextId. When this method is called to log information for a previous request the contextId, clientStartTime and clientEndTime are usually not null, whereas for the current request the contextId and clientStartTime are not null.
Parameters:
contextId - the String context identifier for a primary request or a secondary request. This is a required parameter and a warnign is logged if null.
parentContextId - the String identifier of the ExecutionContext associated with the parent request. This is typically passed in for child (secondary) requests of a primary. This can be null when called for a primary request.
clientStartTime - start time of the client request in UTC using the client's clock. For the page 0 request, client start time will be the "approximate start time", iow, the start time is clocked when the page is about to load on the client rather than the start time when the initial page 0 request was received on the server. This is a required parameter and a warning is logged if null.
clientEndTime - the end time of the user action. Can be null for the current request as it's currently being serviced.

UserActivityInfo

public UserActivityInfo(java.lang.String viewId,
                        java.lang.String windowId,
                        UserActivityInfo.EventInfo eventInfo,
                        java.lang.String clientStartTime,
                        java.util.List<UserActivityInfo.ErrorInfo> errors,
                        java.util.List<java.lang.String> partialTargets)
Creates a user activity record for the current context. This contains information such as the event that triggered the current request, list of errors and clientIds of components that are registered as partial refresh targets.
Parameters:
viewId - the current viewId, this cannot be null.
windowId - the current windowId ((to distinguish results from multiple windows in the same session). This can not be null.
eventInfo - information pertaining to the primary event that caused this server request. If an attribute change caused this request, we may not have an event. But we will certainly have a pprTargets. This can be null in cases where attribute changes caused a partial request.
clientStartTime - start time of the client request in UTC using the client's clock. Usually cannot be null but for the page 0 request, client start time will be null. Also due to the page-0 problem start time will have approximate value.
errors - errors captured on the client, for the current request. If there were no errors this would be null. Server errors get logged as and when they occur.
partialTargets - a list of component ids that have registered as partial targets (on the client) for the current request. If there are no partial targets, this will be null.

Method Detail

getContextId

public java.lang.String getContextId()
Gets the context identifier.
Returns:
a non-null String.

getParentContextId

public java.lang.String getParentContextId()
Gets the parent's context identifier.
Returns:
a String that can be null. A null value indicates that the UserActivityInfo pertains to the primary context (identified by getContextId()).

getClientStartTime

public java.lang.String getClientStartTime()
Gets the client start time.
Returns:
a String representation of the datetime.

getClientEndTime

public java.lang.String getClientEndTime()
Gets the client end time.
Returns:
a String representation of the client end time.

getEventInfo

public UserActivityInfo.EventInfo getEventInfo()
Gets the EventInfo object that contains the event info of the event that triggered this request.
Returns:
a EventInfo instance.

getErrors

public java.util.List<UserActivityInfo.ErrorInfo> getErrors()
A list of ErrorInfo objects, representing the errors that caused the request to fail.
Returns:
a List<ErrorInfo>

getPreviousKeyInSequence

public static java.lang.String getPreviousKeyInSequence(int sequence)
Gets the previous key to use for the specified sequence number.
Parameters:
sequence - the int ffor which to generate the key
Returns:
a Strin

getRedirectLocation

public java.lang.String getRedirectLocation()
Gets the location current request is being redirected to. This information is only available for PPR redirects.
Returns:
a String that can be null.

getRedirectStatusCode

public java.lang.String getRedirectStatusCode()
Gets the status code returned in the PPR response (header) when the current request is being redirected to the redirect location. This information is only available for PPR redirects.
Returns:
a String that can be null.

getViewId

public java.lang.String getViewId()
The viewId for the request.
Returns:
a non null String.

getWindowId

public java.lang.String getWindowId()
The windowId of the window that initiated the request.
Returns:
a non null String windowId.

getPartialTargets

public java.util.List<java.lang.String> getPartialTargets()
A list of client component ids of components that are registered as partial targets for the request.
Returns:
a List<String>

setEventInfo

public void setEventInfo(UserActivityInfo.EventInfo eventInfo)
Sets the event information (typically) on the UserActivityInfo instance pertaining to the current request.
Parameters:
eventInfo - an EventInfo object

setErrors

public void setErrors(java.util.List<UserActivityInfo.ErrorInfo> errors)
Sets a list of ErrorInfo objects on the UserActivityInfo instance pertaining to the current request.
Parameters:
errors - List of ErrorInfo objects

setPartialTargets

public void setPartialTargets(java.util.List<java.lang.String> partialTargets)
Sets the list of partial targets on the UserActivityInfo instance pertaining to the current request.
Parameters:
partialTargets - a List of partial targets.

setRedirectInfo

public void setRedirectInfo(java.lang.String location,
                            java.lang.String statusCode)
For PPR Redirects when the client is about to be redirected to a different URL this method is called to set the location and status code. This information is available only for the current (PPR) request that results in a redirect.
Parameters:
location - url to be redirected to.
statusCode - HTTP status code sent to the client.

setViewId

public void setViewId(java.lang.String viewId)
Sets the viewId on the UserActivityInfo instance pertaining to the current request.
Parameters:
viewId - the viewId.

setWindowId

public void setWindowId(java.lang.String windowId)
Sets the windowId on the UserActivityInfo instance pertaining to the current request.
Parameters:
windowId - the windowId for the current window.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Oracle© Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)
E10684-08


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