Class SocketHubAppender.ServerMonitor

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    SocketHubAppender

    private class SocketHubAppender.ServerMonitor
    extends java.lang.Object
    implements java.lang.Runnable
    This class is used internally to monitor a ServerSocket and register new connections in a vector passed in the constructor.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean keepRunning  
      private java.lang.Thread monitorThread  
      private java.util.Vector oosList  
      private int port  
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerMonitor​(int _port, java.util.Vector _oosList)
      Create a thread and start the monitor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()
      Method that runs, monitoring the ServerSocket and adding connections as they connect to the socket.
      private void sendCachedEvents​(java.io.ObjectOutputStream stream)  
      void stopMonitor()
      Stops the monitor.
      • Methods inherited from class java.lang.Object

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

      • port

        private int port
      • oosList

        private java.util.Vector oosList
      • keepRunning

        private boolean keepRunning
      • monitorThread

        private java.lang.Thread monitorThread
    • Constructor Detail

      • ServerMonitor

        public ServerMonitor​(int _port,
                             java.util.Vector _oosList)
        Create a thread and start the monitor.
    • Method Detail

      • stopMonitor

        public void stopMonitor()
        Stops the monitor. This method will not return until the thread has finished executing.
      • sendCachedEvents

        private void sendCachedEvents​(java.io.ObjectOutputStream stream)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • run

        public void run()
        Method that runs, monitoring the ServerSocket and adding connections as they connect to the socket.
        Specified by:
        run in interface java.lang.Runnable