com.devexperts.qd.kit
Class RecordReaderAdapter

java.lang.Object
  extended by com.devexperts.qd.kit.RecordReaderAdapter
All Implemented Interfaces:
RecordReader

public final class RecordReaderAdapter
extends java.lang.Object
implements RecordReader

Reads incoming records from BufferedInput but add another, resulting record, into RecordBuffer.


Constructor Summary
RecordReaderAdapter(DataRecord incoming_record, DataRecord resulting_record)
           
 
Method Summary
 DataRecord getIncomingRecord()
           
 DataRecord getResultingRecord()
          Returns actual DataRecord that shall be used for subscription.
 void readRecord(com.devexperts.io.BufferedInput in, RecordBuffer buffer, int cipher, java.lang.String symbol)
          Reads record from the specified input and adds it to the specified cursor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordReaderAdapter

public RecordReaderAdapter(DataRecord incoming_record,
                           DataRecord resulting_record)
Method Detail

readRecord

public void readRecord(com.devexperts.io.BufferedInput in,
                       RecordBuffer buffer,
                       int cipher,
                       java.lang.String symbol)
                throws java.io.IOException
Description copied from interface: RecordReader
Reads record from the specified input and adds it to the specified cursor. DataRecord implementation of this method reads the record itself, but other implementations might perform complex transformations or do not read anything at all.

Specified by:
readRecord in interface RecordReader
Throws:
java.io.IOException

getResultingRecord

public DataRecord getResultingRecord()
Description copied from interface: RecordReader
Returns actual DataRecord that shall be used for subscription. It might return null if this reader does not actually read anything. DataRecord implementation of this method returns this.

Specified by:
getResultingRecord in interface RecordReader

getIncomingRecord

public DataRecord getIncomingRecord()
Specified by:
getIncomingRecord in interface RecordReader