org.apache.cocoon.profiling.aspects
Class InvocationDispatcher

java.lang.Object
  extended by org.apache.cocoon.profiling.aspects.InvocationDispatcher

public class InvocationDispatcher
extends Object

The dispatcher gets invoked by a profiling aspect. Based on the class of the component that is invoked a specific Profiler is used to fill a ProfilingData object.

New profilers can be installed with installProfiler(Profiler). More specific profilers will be chosen first automatically. The recommended way to install a Profiler is to declare it as a spring-managed bean. The AutomaticProfilerInstaller will install the Profiler automatically on the correct InvocationDispatcher.


Field Summary
protected static org.slf4j.Logger LOG
          Logger.
 
Constructor Summary
InvocationDispatcher()
           
 
Method Summary
 Object dispatch(org.aspectj.lang.ProceedingJoinPoint pjp)
          Creates a new ProfilingData object and routes this invocation to a Profiler.
 void installProfiler(Profiler<?> profiler)
          Installs a new profiler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.slf4j.Logger LOG
Logger.

Constructor Detail

InvocationDispatcher

public InvocationDispatcher()
Method Detail

dispatch

public Object dispatch(org.aspectj.lang.ProceedingJoinPoint pjp)
                throws Throwable
Creates a new ProfilingData object and routes this invocation to a Profiler.

Parameters:
pjp - the joinpoint
Returns:
return value of ProceedingJoinPoint.proceed()
Throws:
Throwable - throwable from ProceedingJoinPoint.proceed()

installProfiler

public void installProfiler(Profiler<?> profiler)
Installs a new profiler.

Parameters:
profiler - the profiler to install


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