Package org.apache.log4j.chainsaw
Class LoggerNameModelSupport
- java.lang.Object
-
- org.apache.log4j.chainsaw.LoggerNameModelSupport
-
- All Implemented Interfaces:
LoggerNameModel
public class LoggerNameModelSupport extends java.lang.Object implements LoggerNameModel
An implementation of LoggerNameModel which can be used as a delegate
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.event.EventListenerListlistenerListprivate java.util.Set<java.lang.String>loggerNameSet
-
Constructor Summary
Constructors Constructor Description LoggerNameModelSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddLoggerName(java.lang.String loggerName)Attempts to add the loggerName to the model, and returns true if it does, i.e that the loggerName is new, otherwise it is ignored.voidaddLoggerNameListener(LoggerNameListener l)java.util.CollectiongetLoggerNames()Returns an unmodifiable Collection of the uniquely known LoggerNames within this model.private voidnotifyListeners(java.lang.String loggerName)Notifies all the registered listeners that a new unique logger name has been added to this modelvoidremoveLoggerNameListener(LoggerNameListener l)voidreset()The logger names have been cleared
-
-
-
Method Detail
-
getLoggerNames
public java.util.Collection getLoggerNames()
Description copied from interface:LoggerNameModelReturns an unmodifiable Collection of the uniquely known LoggerNames within this model.- Specified by:
getLoggerNamesin interfaceLoggerNameModel- Returns:
- unmodifiable Collection of Logger name Strings
-
addLoggerName
public boolean addLoggerName(java.lang.String loggerName)
Description copied from interface:LoggerNameModelAttempts to add the loggerName to the model, and returns true if it does, i.e that the loggerName is new, otherwise it is ignored.If the loggerName is new for this model, all the LoggerNameListeners are notified using this thread.
- Specified by:
addLoggerNamein interfaceLoggerNameModel
-
reset
public void reset()
Description copied from interface:LoggerNameModelThe logger names have been cleared- Specified by:
resetin interfaceLoggerNameModel
-
notifyListeners
private void notifyListeners(java.lang.String loggerName)
Notifies all the registered listeners that a new unique logger name has been added to this model- Parameters:
loggerName-
-
addLoggerNameListener
public void addLoggerNameListener(LoggerNameListener l)
- Specified by:
addLoggerNameListenerin interfaceLoggerNameModel
-
removeLoggerNameListener
public void removeLoggerNameListener(LoggerNameListener l)
- Specified by:
removeLoggerNameListenerin interfaceLoggerNameModel
-
-