Class CharacterStreamReadingMessageSource

All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationEventPublisherAware, MessageSource<String>, IntegrationPattern, NamedComponent, IntegrationInboundManagement, IntegrationManagement

@Deprecated(forRemoval=true, since="7.0") public class CharacterStreamReadingMessageSource extends CharacterStreamReadingMessageSource
Deprecated, for removal: This API element is subject to removal in a future version.
A pollable source for Readers.
Author:
Mark Fisher, Gary Russell, Artem Bilan, Christian Tzolov, Ngoc Nhan
  • Constructor Details

    • CharacterStreamReadingMessageSource

      public CharacterStreamReadingMessageSource(Reader reader)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct an instance with the provider reader. AbstractMessageSource.receive() will return null when the reader is not ready.
      Parameters:
      reader - the reader.
    • CharacterStreamReadingMessageSource

      public CharacterStreamReadingMessageSource(Reader reader, int bufferSize)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct an instance with the provider reader and buffer size. AbstractMessageSource.receive() will return null when the reader is not ready.
      Parameters:
      reader - the reader.
      bufferSize - the buffer size.
    • CharacterStreamReadingMessageSource

      public CharacterStreamReadingMessageSource(Reader reader, int bufferSize, boolean blockToDetectEOF)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct an instance with the provided reader and buffer size. When blockToDetectEOF is false, AbstractMessageSource.receive() will return null when the reader is not ready. When it is true, the thread will block until data is available; when the underlying stream is closed, a StreamClosedEvent is published to inform the application via an ApplicationListener. This can be useful, for example, when piping stdin
           cat foo.txt | java -jar my.jar
       
      or
           java -jar my.jar < foo.txt
       
      Parameters:
      reader - the reader.
      bufferSize - the buffer size; if negative use the default in BufferedReader.
      blockToDetectEOF - true to block the thread until data is available and publish a StreamClosedEvent at EOF.
      Since:
      5.0
  • Method Details