|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ecyrd.speed4j.StopWatchFactory
public class StopWatchFactory
Provides a friendly way to get yer StopWatches.
This class is not a singleton, which may surprise you.
| Constructor Summary | |
|---|---|
StopWatchFactory(Log logger)
Create a StopWatchFactory using the given Log. |
|
| Method Summary | |
|---|---|
static StopWatchFactory |
getDefault()
Returns the default StopWatchFactory, which contains no Log configuration. |
static StopWatchFactory |
getInstance(Log logger)
Return new StopWatchFactory which uses the specified Log. |
static StopWatchFactory |
getInstance(String loggerName)
Returns a StopWatchFactory that has been configured previously. |
StopWatch |
getStopWatch()
Return a StopWatch for an empty tag and empty message. |
StopWatch |
getStopWatch(String tag)
Returns a StopWatch for the given tag and null message. |
StopWatch |
getStopWatch(String tag,
String message)
Returns a StopWatch for the given tag and given message. |
static void |
shutdown()
Shut down all StopWatchFactories. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StopWatchFactory(Log logger)
StopWatchFactory using the given Log.
logger - The Log to use.| Method Detail |
|---|
public StopWatch getStopWatch()
public StopWatch getStopWatch(String tag)
tag - Tag which identifies this StopWatch.
public StopWatch getStopWatch(String tag,
String message)
tag - Tag which identifies this StopWatch.message - A free-form message.
public static StopWatchFactory getDefault()
public static void shutdown()
public static StopWatchFactory getInstance(Log logger)
logger -
public static StopWatchFactory getInstance(String loggerName)
throws ConfigurationException
loggerName - name to search for.
ConfigurationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||