|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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(PrintWriter writer)
Dumps the process timer entries to the given writer, one entry per line. |
Iterator<String> |
getMessages()
Returns an Iterator of tracking entries. |
void |
log(String message)
Creates an entry with the given message |
void |
log(String format,
Object... args)
Creates an entry with a message constructed from the given MessageFormat format evaluated using the given formatting
arguments. |
void |
logTimer(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(String timerName,
String format,
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(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(PrintWriter writer)
RequestProgressTracker
dump in interface RequestProgressTrackerpublic Iterator<String> getMessages()
RequestProgressTrackerIterator of tracking entries.
If there are no messages null is returned.
getMessages in interface RequestProgressTrackerpublic void log(String message)
RequestProgressTracker
log in interface RequestProgressTracker
public void log(String format,
Object... args)
RequestProgressTrackerMessageFormat format evaluated using the given formatting
arguments.
log in interface RequestProgressTrackerpublic void logTimer(String timerName)
RequestProgressTracker
logTimer in interface RequestProgressTracker
public void logTimer(String timerName,
String format,
Object... args)
RequestProgressTrackerMessageFormat pattern evaluated using the given arguments
and the number of milliseconds elapsed since the timer start.
logTimer in interface RequestProgressTrackerpublic void startTimer(String timerName)
RequestProgressTracker
startTimer in interface RequestProgressTrackerpublic void done()
RequestProgressTracker
done in interface RequestProgressTracker
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||