Package com.simplicite.util.integration
Interface AdapterInterface
-
- All Known Implementing Classes:
CellBasedXLSAdapter
,CellBasedXLSXAdapter
,CSVLineBasedAdapter
,LineBasedAdapter
,SAXImportXML
,SAXParserAdapter
,SimpleAdapter
,SimpleJSONAdapter
,SimpleSAXParserAdapter
,SimpleScriptedAdapter
,SimpleSQLAdapter
,SimpleXLSAdapter
,SimpleXLSXAdapter
,SimpleYAMLAdapter
,SQLAdapter
public interface AdapterInterface
Java adapter interface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Close the adapterConsole
getConsole()
Set consolejava.io.OutputStream
getErrorStream()
Get adapter's error streamjava.io.InputStream
getInputStream()
Get adapter's input streamjava.io.OutputStream
getLogStream()
Get adapter's log streamjava.io.OutputStream
getOutputStream()
Get adapter's output streamchar
getStatus()
Get processing statusvoid
init(java.lang.String name, Grant grant, java.io.InputStream inStream, java.io.OutputStream outStream, java.io.OutputStream errStream, java.io.OutputStream logStream, java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String trackId, java.lang.String origin)
Adapter initializationvoid
postProcess()
Hook postProcess call after processing lines
by default it sends the simplicite XML footer to outputjava.lang.String
preProcess()
Hook preProcess call before processing lines,
by default it sends the simplicite XML header to outputvoid
process()
Input/output/error/logging streams processingvoid
setConsole(Console console)
Set consolevoid
setStatus(char status)
Get processing status
-
-
-
Method Detail
-
init
void init(java.lang.String name, Grant grant, java.io.InputStream inStream, java.io.OutputStream outStream, java.io.OutputStream errStream, java.io.OutputStream logStream, java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String trackId, java.lang.String origin)
Adapter initialization- Parameters:
name
- Adapter namegrant
- User rightsinStream
- Input streamoutStream
- Output streamerrStream
- Error stream for rejected rows (can be null)logStream
- Stream to log info, errors... (can be null)params
- Adapter parameterstrackId
- Tracking IDorigin
- Origin of data
-
preProcess
java.lang.String preProcess()
Hook preProcess call before processing lines,
by default it sends the simplicite XML header to output- Returns:
- Error code to stop, or null to continue
-
process
void process() throws java.lang.InterruptedException
Input/output/error/logging streams processing- Throws:
java.lang.InterruptedException
-
postProcess
void postProcess()
Hook postProcess call after processing lines
by default it sends the simplicite XML footer to output
-
close
void close()
Close the adapter
-
getInputStream
java.io.InputStream getInputStream()
Get adapter's input stream
-
getOutputStream
java.io.OutputStream getOutputStream()
Get adapter's output stream
-
getErrorStream
java.io.OutputStream getErrorStream()
Get adapter's error stream
-
getLogStream
java.io.OutputStream getLogStream()
Get adapter's log stream
-
getStatus
char getStatus()
Get processing status
-
setStatus
void setStatus(char status)
Get processing status- Parameters:
status
- Status
-
getConsole
Console getConsole()
Set console
-
setConsole
void setConsole(Console console)
Set console
-
-