Class LoggingReceiver

  • All Implemented Interfaces:
    java.lang.Runnable

    class LoggingReceiver
    extends java.lang.Thread
    A daemon thread the processes connections from a org.apache.log4j.net.SocketAppender.html.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private class  LoggingReceiver.Slurper
      Helper that actually processes a client connection.
      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static Logger LOG
      used to log messages
      private MyTableModel mModel
      where to put the events
      private java.net.ServerSocket mSvrSock
      server for listening for connections
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      LoggingReceiver​(MyTableModel aModel, int aPort)
      Creates a new LoggingReceiver instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()
      Listens for client connections
      • Methods inherited from class java.lang.Thread

        activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

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

      • LOG

        private static final Logger LOG
        used to log messages
      • mModel

        private MyTableModel mModel
        where to put the events
      • mSvrSock

        private java.net.ServerSocket mSvrSock
        server for listening for connections
    • Constructor Detail

      • LoggingReceiver

        LoggingReceiver​(MyTableModel aModel,
                        int aPort)
                 throws java.io.IOException
        Creates a new LoggingReceiver instance.
        Parameters:
        aModel - model to place put received into
        aPort - port to listen on
        Throws:
        java.io.IOException - if an error occurs
    • Method Detail

      • run

        public void run()
        Listens for client connections
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread