Class ForkStarter.CloseableCloser

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Runnable
    Enclosing class:
    ForkStarter

    private final class ForkStarter.CloseableCloser
    extends java.lang.Object
    implements java.lang.Runnable, java.io.Closeable
    Closes stuff, with a shutdown hook to make sure things really get closed.
    • Constructor Summary

      Constructors 
      Constructor Description
      CloseableCloser​(int jvmRun, java.io.Closeable... testProvidingInputStream)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void run()  
      • Methods inherited from class java.lang.Object

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

      • jvmRun

        private final int jvmRun
      • testProvidingInputStream

        private final java.util.Queue<java.io.Closeable> testProvidingInputStream
      • inputStreamCloserHook

        private final java.lang.Thread inputStreamCloserHook
    • Constructor Detail

      • CloseableCloser

        CloseableCloser​(int jvmRun,
                        java.io.Closeable... testProvidingInputStream)
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable