Class WebServer.TranslateThread

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

    private class WebServer.TranslateThread
    extends java.lang.Thread
    The translate thread reads and writes the file translation.properties once a second.
    • 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.nio.file.Path file  
      private boolean stopNow  
      private java.util.Map<java.lang.Object,​java.lang.Object> translation  
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Constructor Summary

      Constructors 
      Constructor Description
      TranslateThread​(java.util.Map<java.lang.Object,​java.lang.Object> translation)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFileName()  
      void run()  
      void stopNow()  
      • 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

      • file

        private final java.nio.file.Path file
      • translation

        private final java.util.Map<java.lang.Object,​java.lang.Object> translation
      • stopNow

        private volatile boolean stopNow
    • Constructor Detail

      • TranslateThread

        TranslateThread​(java.util.Map<java.lang.Object,​java.lang.Object> translation)
    • Method Detail

      • getFileName

        public java.lang.String getFileName()
      • stopNow

        public void stopNow()
      • run

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