org.apache.cocoon.components.profiler
Class ProfilerImpl

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.profiler.ProfilerImpl
All Implemented Interfaces:
Component, Configurable, LogEnabled, ThreadSafe, Profiler

public class ProfilerImpl
extends AbstractLogEnabled
implements Profiler, ThreadSafe, Configurable

Profiler component implementation. Stores profiler data for all pipelines.

Version:
CVS $Id: ProfilerImpl.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Vadim Gritsenko, Stephan Michels

Field Summary
 
Fields inherited from interface org.apache.cocoon.components.profiler.Profiler
ROLE
 
Constructor Summary
ProfilerImpl()
           
 
Method Summary
 void addResult(String uri, ProfilerData data)
          Add a result for a request.
 void clearResult(Object key)
          Remove the specified result.
 void clearResults()
          Clear the results.
 void configure(Configuration configuration)
          Pass the Configuration to the Configurable class.
 ProfilerResult getResult(Object key)
          Returns a result of a specifed key.
 Collection getResultKeys()
          Returns a collection of all keys
 Collection getResults()
          Returns a collection of the results.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfilerImpl

public ProfilerImpl()
Method Detail

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Pass the Configuration to the Configurable class. This method must always be called after the constructor and before any other method.

Specified by:
configure in interface Configurable
Parameters:
configuration - the class configurations.
Throws:
ConfigurationException

clearResults

public void clearResults()
Clear the results.

Specified by:
clearResults in interface Profiler

clearResult

public void clearResult(Object key)
Remove the specified result.

Specified by:
clearResult in interface Profiler
Parameters:
key - Key of the result.

getResultKeys

public Collection getResultKeys()
Returns a collection of all keys

Specified by:
getResultKeys in interface Profiler
Returns:
Keys of all results.

getResults

public Collection getResults()
Returns a collection of the results.

Specified by:
getResults in interface Profiler
Returns:
Collection of results.

getResult

public ProfilerResult getResult(Object key)
Returns a result of a specifed key.

Specified by:
getResult in interface Profiler
Parameters:
key - Key of the result.
Returns:
Result of the profiling

addResult

public void addResult(String uri,
                      ProfilerData data)
Add a result for a request.

Specified by:
addResult in interface Profiler
Parameters:
uri - URI of the request
data - Result of the profiling


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.