Class 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.EventListenerList listenerList  
      private java.util.Set<java.lang.String> loggerNameSet  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean addLoggerName​(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.
      void addLoggerNameListener​(LoggerNameListener l)  
      java.util.Collection getLoggerNames()
      Returns an unmodifiable Collection of the uniquely known LoggerNames within this model.
      private void notifyListeners​(java.lang.String loggerName)
      Notifies all the registered listeners that a new unique logger name has been added to this model
      void removeLoggerNameListener​(LoggerNameListener l)  
      void reset()
      The logger names have been cleared
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • loggerNameSet

        private java.util.Set<java.lang.String> loggerNameSet
      • listenerList

        private javax.swing.event.EventListenerList listenerList
    • Constructor Detail

      • LoggerNameModelSupport

        public LoggerNameModelSupport()
    • Method Detail

      • getLoggerNames

        public java.util.Collection getLoggerNames()
        Description copied from interface: LoggerNameModel
        Returns an unmodifiable Collection of the uniquely known LoggerNames within this model.
        Specified by:
        getLoggerNames in interface LoggerNameModel
        Returns:
        unmodifiable Collection of Logger name Strings
      • addLoggerName

        public boolean addLoggerName​(java.lang.String loggerName)
        Description copied from interface: LoggerNameModel
        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.

        If the loggerName is new for this model, all the LoggerNameListeners are notified using this thread.

        Specified by:
        addLoggerName in interface LoggerNameModel
      • 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 -