com.endeca.portal.instrumentation.metrics
Class PortletMetric

java.lang.Object
  extended by com.endeca.portal.instrumentation.metrics.GenericMetric
      extended by com.endeca.portal.instrumentation.metrics.PortletMetric
All Implemented Interfaces:
Metric

public class PortletMetric
extends GenericMetric
implements Metric

Bean representing the aggregate performance of a component, tracking the component ID and name, the total number of times the component executed, and the total time of all executions.

Author:
dan

Constructor Summary
PortletMetric(java.lang.String portletId)
          Create a new PortletMetric for this ID.
 
Method Summary
 java.lang.String getPortletId()
          getter for the component ID
 java.lang.String getPortletName()
          getter for component name
 java.lang.String getPortletTitle()
          getter for component title
 void setPortletName(java.lang.String portletName)
          setter for portlet name
 void setPortletTitle(java.lang.String portletTitle)
          setter for component title
 org.json.JSONObject toJSONObject()
          Serializes this object into a JSON string
 
Methods inherited from class com.endeca.portal.instrumentation.metrics.GenericMetric
addSingleExecution, getAverageExecutionTime, getMaxTime, getTotalCount, getTotalTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.endeca.portal.instrumentation.metrics.Metric
addSingleExecution, getAverageExecutionTime, getMaxTime, getTotalCount, getTotalTime
 

Constructor Detail

PortletMetric

public PortletMetric(java.lang.String portletId)
Create a new PortletMetric for this ID.

Parameters:
portletId - the portlet to track
Method Detail

toJSONObject

public org.json.JSONObject toJSONObject()
                                 throws org.json.JSONException
Serializes this object into a JSON string

Specified by:
toJSONObject in interface Metric
Returns:
the JSONObject representing this object
Throws:
org.json.JSONException

getPortletId

public java.lang.String getPortletId()
getter for the component ID

Returns:
the ID

getPortletName

public java.lang.String getPortletName()
getter for component name

Returns:
component name

setPortletName

public void setPortletName(java.lang.String portletName)
setter for portlet name

Parameters:
portletName - the name

getPortletTitle

public java.lang.String getPortletTitle()
getter for component title

Returns:
component title

setPortletTitle

public void setPortletTitle(java.lang.String portletTitle)
setter for component title

Parameters:
portletTitle - the title