Class IOResult

  • All Implemented Interfaces:
    java.lang.Runnable

    public class IOResult
    extends java.lang.Object
    implements java.lang.Runnable
    Class to pass to a thread pool that will consume all output from an external process. This is a Runnable that get submitted to a thread pool. This class records the data it reads
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String THREAD_POOL_NAME  
    • Constructor Summary

      Constructors 
      Constructor Description
      IOResult​(java.io.InputStream input)  
      IOResult​(java.lang.Throwable inception, java.io.InputStream input)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getOutput()  
      java.lang.String getOutputAsString()  
      void run()  
      void setConsumer​(java.util.function.Consumer<java.lang.String> consumer)  
      • Methods inherited from class java.lang.Object

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

      • THREAD_POOL_NAME

        public static final java.lang.String THREAD_POOL_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • IOResult

        public IOResult​(java.io.InputStream input)
      • IOResult

        public IOResult​(java.lang.Throwable inception,
                        java.io.InputStream input)
    • Method Detail

      • setConsumer

        public void setConsumer​(java.util.function.Consumer<java.lang.String> consumer)
      • getOutputAsString

        public java.lang.String getOutputAsString()
      • getOutput

        public java.util.List<java.lang.String> getOutput()
      • run

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