Class InputStreamPipeline

java.lang.Object
org.jgrapes.io.util.InputStreamPipeline
All Implemented Interfaces:
Runnable

public class InputStreamPipeline extends Object implements Runnable
Forwards the content of an input stream as a sequence of Output events.
  • Constructor Details

    • InputStreamPipeline

      public InputStreamPipeline(InputStream in, IOSubchannel channel, EventPipeline eventPipeline)
      Creates a new pipeline that sends the data from the given input stream as events on the given channel, using the given event pipeline.
      Parameters:
      in - the input stream to read from
      channel - the channel to send to
      eventPipeline - the event pipeline used for firing events
    • InputStreamPipeline

      Creates a new pipeline that sends the data from the given input stream as events on the given channel, using the channel’s response pipeline.
      Parameters:
      in - the input stream to read from
      channel - the channel to send to
  • Method Details

    • suppressClose

      Suppresses the sending of a close event when the stream is closed.
      Returns:
      the stream for easy chaining
    • run

      public void run()
      Specified by:
      run in interface Runnable