|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.sling.commons.testing.sling.MockRequestProgressTracker
public class MockRequestProgressTracker
Constructor Summary | |
---|---|
MockRequestProgressTracker()
|
Method Summary | |
---|---|
void |
done()
Call this when done processing the request - all calls except the first one are ignored |
void |
dump(java.io.PrintWriter writer)
Dumps the process timer entries to the given writer, one entry per line. |
java.util.Iterator<java.lang.String> |
getMessages()
Returns an Iterator of tracking entries. |
void |
log(java.lang.String message)
Creates an entry with the given message |
void |
log(java.lang.String format,
java.lang.Object... args)
Creates an entry with a message constructed from the given MessageFormat format evaluated using the given formatting
arguments. |
void |
logTimer(java.lang.String timerName)
Logs an entry with the message set to the name of the timer and the number of milliseconds elapsed since the timer start. |
void |
logTimer(java.lang.String timerName,
java.lang.String format,
java.lang.Object... args)
Logs an entry with the message constructed from the given MessageFormat pattern evaluated using the given arguments
and the number of milliseconds elapsed since the timer start. |
void |
startTimer(java.lang.String timerName)
Starts a named timer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockRequestProgressTracker()
Method Detail |
---|
public void dump(java.io.PrintWriter writer)
RequestProgressTracker
dump
in interface RequestProgressTracker
public java.util.Iterator<java.lang.String> getMessages()
RequestProgressTracker
Iterator
of tracking entries.
If there are no messages null
is returned.
getMessages
in interface RequestProgressTracker
public void log(java.lang.String message)
RequestProgressTracker
log
in interface RequestProgressTracker
public void log(java.lang.String format, java.lang.Object... args)
RequestProgressTracker
MessageFormat
format evaluated using the given formatting
arguments.
log
in interface RequestProgressTracker
public void logTimer(java.lang.String timerName)
RequestProgressTracker
logTimer
in interface RequestProgressTracker
public void logTimer(java.lang.String timerName, java.lang.String format, java.lang.Object... args)
RequestProgressTracker
MessageFormat
pattern evaluated using the given arguments
and the number of milliseconds elapsed since the timer start.
logTimer
in interface RequestProgressTracker
public void startTimer(java.lang.String timerName)
RequestProgressTracker
startTimer
in interface RequestProgressTracker
public void done()
RequestProgressTracker
done
in interface RequestProgressTracker
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |