net.sf.xbus.base.linereader
Interface LineReader

All Known Implementing Classes:
AS400LineReader, FileLineReader

public interface LineReader

LineReaders are used by some Senders and Receivers to send a character stream through the xBus.


Method Summary
 void prepareReading(XBUSSystem system)
          Initialization to be done before reading from the LineReader.
 java.lang.String readRecord()
          readRecord is called by senders to read the incoming data line by line.
 void terminateReading()
          Cleanup to be done after reading from the LineReader, e.g. closing an InputStream.
 

Method Detail

prepareReading

void prepareReading(XBUSSystem system)
                    throws XException
Initialization to be done before reading from the LineReader.

Throws:
XException - if something goes wrong

readRecord

java.lang.String readRecord()
                            throws XException
readRecord is called by senders to read the incoming data line by line.

Returns:
null if there is no more line
Throws:
XException - if something goes wrong

terminateReading

void terminateReading()
                      throws XException
Cleanup to be done after reading from the LineReader, e.g. closing an InputStream.

Throws:
XException - if something goes wrong