Package org.jgrapes.io.util
Class BufferedReaderPipeline
java.lang.Object
org.jgrapes.io.util.BufferedReaderPipeline
- All Implemented Interfaces:
Runnable
-
Constructor Summary
ConstructorDescriptionBufferedReaderPipeline
(BufferedReader in, IOSubchannel channel) Creates a new pipeline that sends the lines from the given reader as events on the given channel, using the channel’s response pipeline.BufferedReaderPipeline
(BufferedReader in, IOSubchannel channel, EventPipeline eventPipeline) Creates a new pipeline that sends the lines from the given reader as events on the given channel, using the given event pipeline. -
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
setEventAssociations
(Map<Object, Object> associations) Configure associations that are applied to the generated Output events, seeEvent.setAssociated(java.lang.Object, java.lang.Object)
.Suppresses the sending of a closed event when the stream is closed.
-
Constructor Details
-
BufferedReaderPipeline
Creates a new pipeline that sends the lines from the given reader as events on the given channel, using the given event pipeline.- Parameters:
in
- the reader to read fromchannel
- the channel to send toeventPipeline
- the event pipeline used for firing events
-
BufferedReaderPipeline
Creates a new pipeline that sends the lines from the given reader as events on the given channel, using the channel’s response pipeline.- Parameters:
in
- the reader to read fromchannel
- the channel to send to
-
-
Method Details
-
sendInputEvents
- Returns:
- the stream for easy chaining
-
suppressClosed
Suppresses the sending of a closed event when the stream is closed.- Returns:
- the stream for easy chaining
-
setEventAssociations
Configure associations that are applied to the generated Output events, seeEvent.setAssociated(java.lang.Object, java.lang.Object)
.- Parameters:
associations
- the associations to apply- Returns:
- the pipeline for easy chaining
-
run
-