|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.perf4j.aop.AbstractTimingAspect
public abstract class AbstractTimingAspect
This is the base class for TimingAspects. Subclasses just need to implement the log(java.lang.String, java.lang.String)
method to use
their logging framework of choice (e.g. log4j or java.logging) to persist the StopWatch log message.
Constructor Summary | |
---|---|
AbstractTimingAspect()
|
Method Summary | |
---|---|
java.lang.Object |
doPerfLogging(org.aspectj.lang.ProceedingJoinPoint pjp,
Profiled profiled)
This advice is used to add the StopWatch logging statements around method executions that have been tagged with the Profiled annotation. |
protected java.lang.String |
evaluateJexl(java.lang.String text,
java.lang.Object[] args)
Helper method is used to parse out {expressionLanguage} elements from the text and evaluate the strings using JEXL. |
protected java.lang.String |
getStopWatchMessage(org.aspectj.lang.ProceedingJoinPoint pjp,
Profiled profiled)
Helper method get the message to use for StopWatch logging. |
protected java.lang.String |
getStopWatchTag(org.aspectj.lang.ProceedingJoinPoint pjp,
Profiled profiled)
Helper method gets the tag to use for StopWatch logging. |
protected abstract void |
log(java.lang.String loggerName,
java.lang.String stopWatchString)
Subclasses must implement this method to persist the StopWatch logging message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTimingAspect()
Method Detail |
---|
public java.lang.Object doPerfLogging(org.aspectj.lang.ProceedingJoinPoint pjp, Profiled profiled) throws java.lang.Throwable
pjp
- The ProceedingJoinPoint encapulates the method around which this aspect advice runs.profiled
- The profiled annotation that was attached to the method.
java.lang.Throwable
- Any exceptions thrown by the underlying method.protected java.lang.String getStopWatchTag(org.aspectj.lang.ProceedingJoinPoint pjp, Profiled profiled)
pjp
- The ProceedingJoinPoint encapulates the method around which this aspect advice runs.profiled
- The profiled annotation that was attached to the method.
protected java.lang.String getStopWatchMessage(org.aspectj.lang.ProceedingJoinPoint pjp, Profiled profiled)
pjp
- The ProceedingJoinPoint encapulates the method around which this aspect advice runs.profiled
- The profiled annotation that was attached to the method.
protected java.lang.String evaluateJexl(java.lang.String text, java.lang.Object[] args)
text
- The text to be parsed.args
- The args that were passed to the method to be profiled.
Profiled.el()
protected abstract void log(java.lang.String loggerName, java.lang.String stopWatchString)
loggerName
- This name identifies the logger to use to persist the log messagestopWatchString
- The StopWatch log to be saved.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |