Class FileServerThread

  • All Implemented Interfaces:
    java.lang.Runnable

    final class FileServerThread
    extends java.lang.Thread
    Thread handling the distribution of files to clients.
    Author:
    Romain Dolbeau
    • Nested Class Summary

      • 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 java.net.ServerSocket fileServer  
      private boolean keepGoingOn  
      private static java.util.logging.Logger LOGGER  
      private int port  
      private static java.lang.String separator  
      private Server server  
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void makeDummyConnection()  
      void run()  
      void stopGoingOn()  
      • 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

      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • fileServer

        private java.net.ServerSocket fileServer
      • server

        private final Server server
      • port

        private final int port
      • keepGoingOn

        private boolean keepGoingOn
    • Constructor Detail

      • FileServerThread

        FileServerThread​(Server server,
                         int port)
    • Method Detail

      • stopGoingOn

        public void stopGoingOn()
      • makeDummyConnection

        private void makeDummyConnection()
      • run

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