|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.northconcepts.datapipeline.core.DataEndpoint
com.northconcepts.datapipeline.core.DataReader
com.northconcepts.datapipeline.core.ProxyReader
public class ProxyReader
Abstract super-class for obtaining records from another DataReader, possibly transforming
them along the way. The only method that a subclass should implement is interceptRecord(Record).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint |
|---|
DataEndpoint.State |
| Field Summary |
|---|
| Fields inherited from class com.northconcepts.datapipeline.core.DataEndpoint |
|---|
BUFFER_SIZE, log |
| Constructor Summary | |
|---|---|
ProxyReader(DataReader nestedDataReader)
|
|
| Method Summary | |
|---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a DataException. |
int |
available()
Returns the number of records that can probably be read without blocking. |
void |
close()
Indicates that this endpoint has finished reading or writing. |
DataReader |
getNestedReader()
Returns the DataReader held inside this one or null if there isn't one. |
protected Record |
interceptRecord(Record record)
|
void |
open()
Makes this endpoint ready for reading or writing. |
protected Record |
readImpl()
Overridden by subclasses to read the next record from this DataReader. |
protected void |
setNestedDataReader(DataReader nestedDataReader)
Make sure to close old target and open the new one or call #setTargetDataReader(DataReader, boolean) with true. |
protected void |
setNestedDataReader(DataReader nestedDataReader,
boolean manageLifecycle)
|
| Methods inherited from class com.northconcepts.datapipeline.core.DataReader |
|---|
getBufferSize, getRootReader, peek, pop, push, read, skip |
| Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint |
|---|
assertNotOpened, assertOpened, decrementRecordCount, exception, exception, exception, finalize, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProxyReader(DataReader nestedDataReader)
| Method Detail |
|---|
public DataReader getNestedReader()
DataReaderDataReader held inside this one or null if there isn't one.
getNestedReader in class DataReaderprotected void setNestedDataReader(DataReader nestedDataReader)
#setTargetDataReader(DataReader, boolean) with true.
protected void setNestedDataReader(DataReader nestedDataReader,
boolean manageLifecycle)
throws DataException
DataException
public int available()
throws DataException
DataReader
available in class DataReaderDataException
public void open()
throws DataException
DataEndpoint
open in class DataEndpointDataException
public void close()
throws DataException
DataEndpoint
close in class DataEndpointDataException
protected Record interceptRecord(Record record)
throws Throwable
Throwable
protected Record readImpl()
throws Throwable
DataReaderDataReader.
If no record is available, null will be returned.
readImpl in class DataReaderThrowablepublic DataException addExceptionProperties(DataException exception)
DataEndpointDataException. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.
addExceptionProperties in class DataReader
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||