org.apache.cocoon.profiling.data
Class ProfilingData

java.lang.Object
  extended by org.apache.cocoon.profiling.data.ProfilingData
All Implemented Interfaces:
Serializable

public class ProfilingData
extends Object
implements Serializable

Class used to store the gathered profiling information for one intercepted method invocation.

See Also:
Serialized Form

Constructor Summary
ProfilingData()
           
 
Method Summary
 void addChild(ProfilingData data)
          Add the given ProfilingData as child and make this object its parent.
 void addChildren(List<ProfilingData> children)
          Add the given list of children and make this object their parent.
 void addData(String key, String value)
           
 List<InstanceRepresentation> getArguments()
           
 ProfilingData getChild(int index)
           
 int getChildCount()
           
 List<ProfilingData> getChildren()
           
 Map<String,String> getData()
           
 String getData(String key)
           
 String getDisplayName()
           
 Exception getException()
           
 double getExecutionMillis()
           
 String getId()
           
 int getInvocationDepth()
           
 Long getInvocationEndTime()
           
 Long getInvocationStartTime()
           
 String getMethod()
           
 ProfilingData getParent()
           
 String getProfiler()
           
 String getProfilingId()
           
 InstanceRepresentation getReturnValue()
           
 InstanceRepresentation getTarget()
           
 boolean hasChildren()
           
 boolean isDisplayNameSet()
           
 boolean isRoot()
           
 void removeAllChildren()
          Remove all children and set their parent null.
 boolean removeChild(ProfilingData data)
          Remove the given ProfilingData child and set its parent to null if removal was successful.
 void setArguments(Object[] arguments)
           
 void setCallFrameId(int callFrameId)
           
 void setDisplayName(String displayName)
           
 void setException(Exception exception)
           
 void setInvocationDepth(int depth)
           
 void setInvocationEndTime(Long invocationEndTime)
           
 void setInvocationStartTime(Long invocationStartTime)
           
 void setMethod(String method)
           
 void setProfiler(String profiler)
           
 void setProfilingId(String profilingId)
           
 void setReturnValue(Object obj)
           
 void setRoot(boolean root)
           
 void setTarget(Object target)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfilingData

public ProfilingData()
Method Detail

addChild

public void addChild(ProfilingData data)
Add the given ProfilingData as child and make this object its parent.

Parameters:
data -

addChildren

public void addChildren(List<ProfilingData> children)
Add the given list of children and make this object their parent.

Parameters:
children -

addData

public void addData(String key,
                    String value)

getArguments

public List<InstanceRepresentation> getArguments()

getChild

public ProfilingData getChild(int index)

getChildCount

public int getChildCount()

getChildren

public List<ProfilingData> getChildren()

getData

public Map<String,String> getData()

getData

public String getData(String key)

getDisplayName

public String getDisplayName()
Returns:
the display name or the simple name of the target object's class if the displayName is null, or the String representation of this object, if both the displayName and the target happen to be null.

getException

public Exception getException()

getExecutionMillis

public double getExecutionMillis()

getId

public String getId()
Returns:
the id, which is built combining the object id of the target and of the callFrame.

getInvocationDepth

public int getInvocationDepth()

getInvocationEndTime

public Long getInvocationEndTime()
Returns:
the invocation end time in nanoseconds

getInvocationStartTime

public Long getInvocationStartTime()
Returns:
the invocation start time in nanoseconds

getMethod

public String getMethod()

getParent

public ProfilingData getParent()

getProfiler

public String getProfiler()

getProfilingId

public String getProfilingId()

getReturnValue

public InstanceRepresentation getReturnValue()

getTarget

public InstanceRepresentation getTarget()

hasChildren

public boolean hasChildren()

isDisplayNameSet

public boolean isDisplayNameSet()

isRoot

public boolean isRoot()

removeAllChildren

public void removeAllChildren()
Remove all children and set their parent null.


removeChild

public boolean removeChild(ProfilingData data)
Remove the given ProfilingData child and set its parent to null if removal was successful.

Parameters:
data -

setArguments

public void setArguments(Object[] arguments)

setCallFrameId

public void setCallFrameId(int callFrameId)

setDisplayName

public void setDisplayName(String displayName)

setException

public void setException(Exception exception)

setInvocationDepth

public void setInvocationDepth(int depth)

setInvocationEndTime

public void setInvocationEndTime(Long invocationEndTime)
Parameters:
invocationEndTime - the invocation end time in nanoseconds

setInvocationStartTime

public void setInvocationStartTime(Long invocationStartTime)
Parameters:
invocationStartTime - the invocation start time in nanoseconds

setMethod

public void setMethod(String method)

setProfiler

public void setProfiler(String profiler)

setProfilingId

public void setProfilingId(String profilingId)

setReturnValue

public void setReturnValue(Object obj)

setRoot

public void setRoot(boolean root)

setTarget

public void setTarget(Object target)


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.