|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gargoylesoftware.base.trace.TraceItemDispatcher
public class TraceItemDispatcher
Internal use only.
.A dispatcher for TraceItems
| Field Summary | |
|---|---|
private static int |
BUFFER_DISABLED
|
private static int |
BUFFER_ENABLED
|
private static int |
BUFFER_SHUTTING_DOWN
|
private static int |
bufferStatus_
|
private int |
cacheMaxSize_
|
private TraceItemQueue |
cacheTraceItemQueue_
|
private static java.text.Format |
TIMESTAMP_FORMAT
|
private TraceItemQueue |
traceQueue_
|
| Constructor Summary | |
|---|---|
TraceItemDispatcher()
|
|
| Method Summary | |
|---|---|
protected void |
assertNotNull(java.lang.String fieldName,
java.lang.Object fieldValue)
Verify that the specified value is not null. |
private static void |
defaultTraceWriter(TraceItem item)
Provide default behaviour |
void |
dispatch(TraceItem item)
Add an item to the trace queue. |
void |
disposeTraceItem(TraceItem item)
Dispose of a trace item. |
private void |
dumpTraceElement(TraceItem item)
Format an item and print it to standard out. |
void |
flush()
|
TraceItem |
getNewTraceItem()
Return a trace item |
TraceItemQueue |
getTraceItemQueue()
Get the queue. |
boolean |
isBufferingEnabled()
Return true if buffering is enabled. |
void |
run()
|
void |
setBufferingEnabled(boolean enabled)
Set whether or not to buffer the output of the trace calls. |
private void |
waitForQueueToEmpty()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.text.Format TIMESTAMP_FORMAT
private static final int BUFFER_ENABLED
private static final int BUFFER_SHUTTING_DOWN
private static final int BUFFER_DISABLED
private static int bufferStatus_
private final TraceItemQueue traceQueue_
private TraceItemQueue cacheTraceItemQueue_
private int cacheMaxSize_
| Constructor Detail |
|---|
public TraceItemDispatcher()
| Method Detail |
|---|
public void run()
run in interface java.lang.Runnableprivate void dumpTraceElement(TraceItem item)
item - the item to print.private static void defaultTraceWriter(TraceItem item)
item - The item to printpublic TraceItemQueue getTraceItemQueue()
public void dispatch(TraceItem item)
item - The item to add.private void waitForQueueToEmpty()
public void setBufferingEnabled(boolean enabled)
enabled - True if buffering should be enabledpublic boolean isBufferingEnabled()
public void flush()
public TraceItem getNewTraceItem()
public void disposeTraceItem(TraceItem item)
item - The item to dispose.
protected final void assertNotNull(java.lang.String fieldName,
java.lang.Object fieldValue)
throws DetailedNullPointerException
fieldName - The name of the field to checkfieldValue - The value of the field to check
DetailedNullPointerException - If fieldValue is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||