|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.gargoylesoftware.base.trace.TraceChannel
This class represents a "channel" that diagnostic messages can be written to. The channel will contain zero or more TraceWriters which will be responsible for handling the messages.
Constructor Summary | |
TraceChannel(String name)
Create a trace channel with the specified name. |
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener. |
void |
addTraceWriter(TraceWriter writer)
Add a trace writer. |
protected void |
assertNotNull(String fieldName,
Object fieldValue)
Verify that the specified value is not null. |
String |
getName()
Return the name of this trace channel. |
boolean |
isEnabled()
Return true if this channel is enabled. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener. |
void |
removeTraceWriter(TraceWriter writer)
Remove a trace writer. |
void |
setEnabled(boolean isEnabled)
Set whether or not this channel is enabled. |
String |
toString()
Return a string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TraceChannel(String name)
name
- The name of the channel.Method Detail |
public final String getName()
public String toString()
public void setEnabled(boolean isEnabled)
isEnabled
- true if this channel should be enabled.public boolean isEnabled()
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The new listenerpublic void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The listener to removepublic void addTraceWriter(TraceWriter writer)
writer
- A trace writerpublic void removeTraceWriter(TraceWriter writer)
writer
- A trace writerprotected final void assertNotNull(String fieldName, 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 |