Package com.simplicite.util.integration
Class SimpleScriptedAdapter
- java.lang.Object
-
- com.simplicite.util.integration.SimpleAdapter
-
- com.simplicite.util.integration.SimpleScriptedAdapter
-
- All Implemented Interfaces:
AdapterInterface
,java.io.Serializable
public class SimpleScriptedAdapter extends SimpleAdapter
Adapter class for scripted adapters
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleScriptedAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getScript()
Get server script document contentjava.lang.String
getScriptId()
Get server script document IDvoid
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()
Called after processing lines, by default it sends the XML footer to outputjava.lang.String
preProcess()
Called before processing lines, by default it sends the XML header to outputvoid
process()
Input/output/error/logging streams processingvoid
setScript(java.lang.String s)
Set server script document contentvoid
setScriptId(java.lang.String id)
Set server script document ID-
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, setConsole, setErrorStream, setInputData, setInputStream, setLogStream, setOutputStream, setParameter, setParameter, setParameter, setParameter, setProcessCount, setStatus
-
-
-
-
Method Detail
-
getScriptId
public java.lang.String getScriptId()
Get server script document ID
-
setScriptId
public void setScriptId(java.lang.String id)
Set server script document ID
-
getScript
public java.lang.String getScript()
Get server script document content
-
setScript
public void setScript(java.lang.String s)
Set server script document content
-
init
public 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)
Description copied from class:SimpleAdapter
Adapter initialization- Specified by:
init
in interfaceAdapterInterface
- Overrides:
init
in classSimpleAdapter
- Parameters:
name
- Adapter namegrant
- User rightsinStream
- Input stream of dataoutStream
- Output stream of XMLerrStream
- Optional error stream for rejected incoming datalogStream
- Optional stream to log info, errors...params
- Adapter parameterstrackId
- Tracking IDorigin
- Origin of data
-
preProcess
public java.lang.String preProcess()
Description copied from class:SimpleAdapter
Called before processing lines, by default it sends the XML header to output- Specified by:
preProcess
in interfaceAdapterInterface
- Overrides:
preProcess
in classSimpleAdapter
- Returns:
- Error code to stop, or null to continue
-
process
public void process() throws java.lang.InterruptedException
Description copied from interface:AdapterInterface
Input/output/error/logging streams processing- Throws:
java.lang.InterruptedException
-
postProcess
public void postProcess()
Description copied from class:SimpleAdapter
Called after processing lines, by default it sends the XML footer to output- Specified by:
postProcess
in interfaceAdapterInterface
- Overrides:
postProcess
in classSimpleAdapter
-
-