com.northconcepts.datapipeline.transform
Class TransformingReader

java.lang.Object
  extended by com.northconcepts.datapipeline.core.DataEndpoint
      extended by com.northconcepts.datapipeline.core.DataReader
          extended by com.northconcepts.datapipeline.core.ProxyReader
              extended by com.northconcepts.datapipeline.transform.TransformingReader

public class TransformingReader
extends ProxyReader

A proxy that applies transformations to records passing through.


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
TransformingReader(DataReader reader)
           
 
Method Summary
 TransformingReader add(Transformer... transformer)
           
 DataException addExceptionProperties(DataException exception)
          Adds this endpoint's current state to a DataException.
 Transformer get(int index)
           
 int getCount()
           
protected  Record interceptRecord(Record record)
           
 boolean isExceptionOnFailure()
           
 boolean isRecordStackTraceInMessage()
           
 TransformingReader setExceptionOnFailure(boolean exceptionOnFailure)
           
 TransformingReader setRecordStackTraceInMessage(boolean recordStackTraceInMessage)
           
 
Methods inherited from class com.northconcepts.datapipeline.core.ProxyReader
available, close, getNestedReader, open, readImpl, setNestedDataReader, setNestedDataReader
 
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

TransformingReader

public TransformingReader(DataReader reader)
Method Detail

isExceptionOnFailure

public boolean isExceptionOnFailure()

setExceptionOnFailure

public TransformingReader setExceptionOnFailure(boolean exceptionOnFailure)

isRecordStackTraceInMessage

public boolean isRecordStackTraceInMessage()

setRecordStackTraceInMessage

public TransformingReader setRecordStackTraceInMessage(boolean recordStackTraceInMessage)

add

public TransformingReader add(Transformer... transformer)

getCount

public int getCount()

get

public Transformer get(int index)

interceptRecord

protected Record interceptRecord(Record record)
                          throws Throwable
Overrides:
interceptRecord in class ProxyReader
Throws:
Throwable

addExceptionProperties

public DataException addExceptionProperties(DataException exception)
Description copied from class: DataEndpoint
Adds this endpoint's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.

Overrides:
addExceptionProperties in class ProxyReader


Copyright (c) 2007-2009 North Concepts Inc. All Rights Reserved.