public abstract class Transformer extends Object
| Constructor and Description |
|---|
Transformer() |
| Modifier and Type | Method and Description |
|---|---|
DataException |
addExceptionProperties(DataException exception) |
protected void |
close()
Called by
TransformingReader or TransformingWriter when their close() method is called (after reading or writing ends). |
DataEndpoint |
geEndpoint()
Deprecated.
Use
getEndpoint() instead. |
DataEndpoint |
getEndpoint() |
TransformingReader |
getReader() |
TransformingWriter |
getWriter() |
static Transformer |
of(Function<Record,Boolean> function)
Creates a Transformer from a Java Function.
|
protected void |
open()
Called by
TransformingReader or TransformingWriter when their open() method is called (before reading or writing starts). |
void |
setWriter(TransformingWriter writer) |
abstract boolean |
transform(Record record)
Applies this transformer to a record on its way through a
TransformingReader or TransformingWriter. |
public DataEndpoint getEndpoint()
@Deprecated public DataEndpoint geEndpoint()
getEndpoint() instead.public TransformingReader getReader()
public TransformingWriter getWriter()
public void setWriter(TransformingWriter writer)
public DataException addExceptionProperties(DataException exception)
protected void open()
TransformingReader or TransformingWriter when their open() method is called (before reading or writing starts).protected void close()
TransformingReader or TransformingWriter when their close() method is called (after reading or writing ends).public abstract boolean transform(Record record) throws Throwable
TransformingReader or TransformingWriter.
Contract for subclasses (see also docs/authoring/Transformer.md):
record in place as needed.true to keep the record in the pipeline.false to drop the record (the host routes it to a discard
writer if one is configured, otherwise it disappears).incrementRecordCount() on the host endpoint; the host handles it.Throwablepublic static Transformer of(Function<Record,Boolean> function)
function - the function that transforms records, returning true to continue or false to discard the recordCopyright (c) 2006-2026 North Concepts Inc. All Rights Reserved.