|
|||||||||
| 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.DataWriter
com.northconcepts.datapipeline.core.ProxyWriter
public class ProxyWriter
Abstract super-class for writing records to another DataWriter, 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 | |
|---|---|
ProxyWriter(DataWriter nestedDataWriter)
|
|
| Method Summary | |
|---|---|
DataException |
addExceptionProperties(DataException exception)
Adds this endpoint's current state to a DataException. |
void |
close()
Indicates that this endpoint has finished reading or writing. |
DataWriter |
getNestedWriter()
Returns the DataWriter 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 void |
setNestedDataWriter(DataWriter nestedDataWriter)
Make sure to close old target and open the new one or call setNestedDataWriter(DataWriter, boolean) with true. |
protected void |
setNestedDataWriter(DataWriter nestedDataWriter,
boolean manageLifecycle)
|
protected void |
writeImpl(Record record)
Overridden by subclasses to write the specified record to this DataWriter. |
| Methods inherited from class com.northconcepts.datapipeline.core.DataWriter |
|---|
getRootWriter, write |
| Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint |
|---|
assertNotOpened, assertOpened, decrementRecordCount, exception, exception, exception, finalize, getDescription, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, setDescription, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProxyWriter(DataWriter nestedDataWriter)
| Method Detail |
|---|
public DataWriter getNestedWriter()
DataWriterDataWriter held inside this one or null if there isn't one.
getNestedWriter in class DataWriterprotected void setNestedDataWriter(DataWriter nestedDataWriter)
setNestedDataWriter(DataWriter, boolean) with true.
protected void setNestedDataWriter(DataWriter nestedDataWriter,
boolean manageLifecycle)
throws DataException
DataException
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 void writeImpl(Record record)
throws Throwable
DataWriterDataWriter.
writeImpl in class DataWriterThrowablepublic 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 DataWriter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||