Package com.simplicite.util.integration
Class LineBasedAdapter
- java.lang.Object
-
- com.simplicite.util.integration.SimpleAdapter
-
- com.simplicite.util.integration.LineBasedAdapter
-
- All Implemented Interfaces:
AdapterInterface
,java.io.Serializable
- Direct Known Subclasses:
CSVLineBasedAdapter
public abstract class LineBasedAdapter extends SimpleAdapter
Abstract adapter dedicated to line based input streams
The only method to implement is the single line level processLine() method- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LineBasedAdapter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
postProcess()
Post processvoid
process()
Iterates input stream as individual lines
Each line is passed to the processLine() method for processingabstract java.lang.String
processLine(long lineNumber, java.lang.String line)
Line processing to override-
Methods inherited from class com.simplicite.util.integration.SimpleAdapter
append, appendError, appendError, appendLog, appendLog, close, directProcess, getBooleanParameter, getBooleanParameter, getConsole, getErrorStream, getErrorWriter, getGrant, getInputReader, getInputStream, getIntParameter, getIntParameter, getLogStream, getLogWriter, getLongParameter, getLongParameter, getName, getOrigin, getOutputStream, getOutputWriter, getParameter, getParameter, getParameters, getProcessCount, getStatus, getTrackingId, init, preProcess, setConsole, setErrorStream, setInputData, setInputStream, setLogStream, setOutputStream, setParameter, setParameter, setParameter, setParameter, setProcessCount, setStatus
-
-
-
-
Method Detail
-
process
public void process() throws java.lang.InterruptedException
Iterates input stream as individual lines
Each line is passed to the processLine() method for processing- Throws:
java.lang.InterruptedException
-
postProcess
public void postProcess()
Post process- Specified by:
postProcess
in interfaceAdapterInterface
- Overrides:
postProcess
in classSimpleAdapter
-
processLine
public abstract java.lang.String processLine(long lineNumber, java.lang.String line) throws PlatformException, java.lang.InterruptedException
Line processing to override
- Parameters:
lineNumber
- Input line number (1 is the first line)line
- Input line- Returns:
- Processed line as XML statements or null
- Throws:
PlatformException
java.lang.InterruptedException
-
-