oracle.portal.provider.v1.http
Class PerformanceLogger

java.lang.Object
  |
  +--oracle.portal.provider.v1.http.PerformanceLogger

public class PerformanceLogger
extends java.lang.Object

This class is used to collect and output performance statistics for a show request.


Field Summary
static int VALIDATION_CACHE_HIT
           
static int VALIDATION_CACHE_MISS_NEW
           
static int VALIDATION_CACHE_MISS_STALE
           
 
Constructor Summary
PerformanceLogger()
           
 
Method Summary
 void finishProcessing()
          Stop the timer once an incoming request has been processed.
 void finishReadCustomization()
          Stop the timer once a portlet customisation object has been read.
 void finishRenderFooter()
          Stop the timer once a portlet footer has been rendered.
 void finishRenderHeader()
          Stop the timer once a portlet header has been rendered.
 void finishRequest()
          Stop request timer.
 void finishWriteCustomization()
          Stop the timer once a portlet customisation object has been written to.
 void setAction(int action)
          Set the request action
 void setCacheLevel(int level)
          Set the level at which the portlet uses expiry or validation caching.
 void setExpiryCacheTime(int minutes)
          Set the time in minutes that a portlet is valid for.
 void setPortletId(long id)
          Sets the portlet id for a show request.
 void setPortletInstanceName(java.lang.String name)
          Sets the portlet instance name for a show request.
 void setPortletName(java.lang.String name)
          Sets the portlet name for a show request.
 void setProviderId(long id)
          Sets the provider id for a show request.
 void setRequestId(java.lang.String id)
          Sets the request id for show requests.
 void setUser(java.lang.String user)
          Sets the user name for a show request.
 void setValidationCacheHitStatus(int status)
          For validation caching, set the hit status for the portlet.
 void setValidationCacheRequestKey(java.lang.String key)
          Sets the cache version used in the incoming request for validation caching.
 void setValidationCacheResponseKey(java.lang.String key)
          Sets the cache version in the response for validation caching.
 void startProcessing()
          Start a timer to measure the time taken to process an incoming design time or show request.
 void startReadCustomization()
          Start a timer to measure the time taken to access a portlet customisation object.
 void startRenderFooter()
          Start a timer to measure the time taken to render a portlet footer.
 void startRenderHeader()
          Start a timer to measure the time taken to render a portlet header.
 void startRequest()
          Start the overall request timer.
 void startWriteCustomization()
          Start a timer to measure the time taken to write information to a portlet customosation object.
 void writeLog(ProviderLog logger)
          Writes the performance information to a ProviderLog instance.
 void writeResponse(javax.servlet.http.HttpServletResponse response)
          Appends the information to the portlet content so that it may be seen by the user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATION_CACHE_MISS_STALE

public static final int VALIDATION_CACHE_MISS_STALE

VALIDATION_CACHE_MISS_NEW

public static final int VALIDATION_CACHE_MISS_NEW

VALIDATION_CACHE_HIT

public static final int VALIDATION_CACHE_HIT
Constructor Detail

PerformanceLogger

public PerformanceLogger()
Method Detail

setAction

public void setAction(int action)
Set the request action
Parameters:
action - request action type, e.g, show portlet, register provider

startRequest

public void startRequest()
Start the overall request timer.

finishRequest

public void finishRequest()
Stop request timer.

startProcessing

public void startProcessing()
Start a timer to measure the time taken to process an incoming design time or show request.

finishProcessing

public void finishProcessing()
Stop the timer once an incoming request has been processed.

startRenderHeader

public void startRenderHeader()
Start a timer to measure the time taken to render a portlet header. This method is only called during show requests.

finishRenderHeader

public void finishRenderHeader()
Stop the timer once a portlet header has been rendered.

startRenderFooter

public void startRenderFooter()
Start a timer to measure the time taken to render a portlet footer. This method is only called during a show request.

finishRenderFooter

public void finishRenderFooter()
Stop the timer once a portlet footer has been rendered.

startReadCustomization

public void startReadCustomization()
Start a timer to measure the time taken to access a portlet customisation object. This may be called more than once during a show request.

finishReadCustomization

public void finishReadCustomization()
Stop the timer once a portlet customisation object has been read. This may be called more than once during a show request.

startWriteCustomization

public void startWriteCustomization()
Start a timer to measure the time taken to write information to a portlet customosation object. This may be called more than once during a show request.

finishWriteCustomization

public void finishWriteCustomization()
Stop the timer once a portlet customisation object has been written to. This may be called more than once during a show request.

setCacheLevel

public void setCacheLevel(int level)
Set the level at which the portlet uses expiry or validation caching. This may be set as either USER or SYSTEM. Any other value will be ignored.
Parameters:
level - the caching level.

setExpiryCacheTime

public void setExpiryCacheTime(int minutes)
Set the time in minutes that a portlet is valid for. Used in expiry caching only.
Parameters:
minutes - expiry time in minutes

setValidationCacheHitStatus

public void setValidationCacheHitStatus(int status)
For validation caching, set the hit status for the portlet. It may be a hit, a stale miss or a new miss. Any other value will be ignored.
Parameters:
status - the validation cache hit status

setValidationCacheRequestKey

public void setValidationCacheRequestKey(java.lang.String key)
Sets the cache version used in the incoming request for validation caching.
Parameters:
key - the cache version

setValidationCacheResponseKey

public void setValidationCacheResponseKey(java.lang.String key)
Sets the cache version in the response for validation caching.
Parameters:
key - the cache version

setRequestId

public void setRequestId(java.lang.String id)
Sets the request id for show requests. These ids are oracle specific and used to track requests across the Portal infrastructure.
Parameters:
id - the request id

setPortletName

public void setPortletName(java.lang.String name)
Sets the portlet name for a show request.
Parameters:
name - the portlet name

setPortletInstanceName

public void setPortletInstanceName(java.lang.String name)
Sets the portlet instance name for a show request.
Parameters:
name - the portlet instance name

setPortletId

public void setPortletId(long id)
Sets the portlet id for a show request.
Parameters:
id - the portlet id

setProviderId

public void setProviderId(long id)
Sets the provider id for a show request.
Parameters:
id - the provider id

setUser

public void setUser(java.lang.String user)
Sets the user name for a show request.
Parameters:
id - the user name

writeLog

public void writeLog(ProviderLog logger)
Writes the performance information to a ProviderLog instance.
Parameters:
logger - the object to be used for recording the info

writeResponse

public void writeResponse(javax.servlet.http.HttpServletResponse response)
                   throws java.io.IOException
Appends the information to the portlet content so that it may be seen by the user.
Parameters:
response - the response object for the portlet content