Interface StreamConsumer

  • All Known Implementing Classes:
    CommandLineUtils.StringStreamConsumer, DefaultConsumer, WriterStreamConsumer

    public interface StreamConsumer

    Works in concert with the StreamPumper class to allow implementations to gain access to the lines being "Pumped".

    Please note that implementations of this interface can be expected to be called from arbitrary threads and must therefore be threadsafe.

    • Method Detail

      • consumeLine

        void consumeLine​(java.lang.String line)
                  throws java.io.IOException
        Called when the StreamPumper pumps a line from the Stream.
        Parameters:
        line - The line to be consumed.
        Throws:
        java.io.IOException - if consuming line fails.