org.springframework.integration.adapter.stream
Class CharacterStreamSource

java.lang.Object
  extended by org.springframework.integration.adapter.stream.CharacterStreamSource
All Implemented Interfaces:
MessageSource<java.lang.String>, PollableSource<java.lang.String>

public class CharacterStreamSource
extends java.lang.Object
implements PollableSource<java.lang.String>

A pollable source for Readers.

Author:
Mark Fisher

Field Summary
private  java.lang.Object monitor
           
private  java.io.BufferedReader reader
           
 
Constructor Summary
CharacterStreamSource(java.io.Reader reader)
           
CharacterStreamSource(java.io.Reader reader, int bufferSize)
           
 
Method Summary
 StringMessage receive()
          Retrieve a message from this source or null if no message is available.
static CharacterStreamSource stdin()
           
static CharacterStreamSource stdin(java.lang.String charsetName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

private final java.io.BufferedReader reader

monitor

private final java.lang.Object monitor
Constructor Detail

CharacterStreamSource

public CharacterStreamSource(java.io.Reader reader)

CharacterStreamSource

public CharacterStreamSource(java.io.Reader reader,
                             int bufferSize)
Method Detail

receive

public StringMessage receive()
Description copied from interface: PollableSource
Retrieve a message from this source or null if no message is available.

Specified by:
receive in interface PollableSource<java.lang.String>

stdin

public static final CharacterStreamSource stdin()

stdin

public static final CharacterStreamSource stdin(java.lang.String charsetName)