|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.parser.ParserImpl
com.ibm.di.parser.ScriptParser
public class ScriptParser
To operate, a Script Parser must implement a few functions. The functions do not use parameters. Passing data between the hosting Connector and the script is done by using predefined objects. One of these predefined objects is the result object which is used to communicate status information. Upon entry into either function, the status field is set to normal which causes the hosting Parser to continue calls. Signaling end-of-input or errors is done by setting the status and message fields in this object. The entry object is populated on calls to writeEntry and is expected to be populated in the readEntry function. When reading entries you have the inp BufferedReader object available for reading character data from a stream. When writing entries you have the out BufferedWriter object available for writing character data to a stream.
Field Summary |
---|
Fields inherited from class com.ibm.di.parser.ParserImpl |
---|
_debug, myConfiguration |
Constructor Summary | |
---|---|
ScriptParser()
|
Method Summary | |
---|---|
void |
closeParser()
This method is called by the hosting component (e.g. |
void |
flush()
This method is called by the hosting component (e.g. |
String |
getName()
Retrieves name of the FC. |
String |
getVersion()
Version information. |
void |
initParser()
Initializes parser's components. |
Object |
querySchema(Object source)
Discover the schema for the Parser. |
Entry |
readEntry()
Return the next entry from the current input stream. |
void |
writeEntry(Entry entry)
Write an entry to the current output stream. |
Methods inherited from class com.ibm.di.parser.ParserImpl |
---|
debug, debugMode, getClassInstance, getContext, getDebug, getInputStream, getOutputStream, getParam, getParser, getReader, getWriter, isDeltaSupported, logmsg, registerScriptBeans, setConfiguration, setContext, setDebug, setInputStream, setInputStream, setInputStream, setOutputStream, setOutputStream, setParam, setParser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptParser()
Method Detail |
---|
public void initParser() throws Exception
initParser
in interface ParserInterface
initParser
in class ParserImpl
Exception
- if an error occurs.public String getName()
public void writeEntry(Entry entry) throws Exception
entry
- The entry to write
Exception
- if an error occurs.public Entry readEntry() throws Exception
Exception
public Object querySchema(Object source) throws Exception
querySchema
in interface ParserInterface
querySchema
in class ParserImpl
source
- The object on which to discover schema
Exception
- If an I/O error occurspublic String getVersion()
public void closeParser() throws Exception
closeParser
in interface ParserInterface
closeParser
in class ParserImpl
Exception
- If an I/O error occurspublic void flush() throws Exception
flush
in interface ParserInterface
flush
in class ParserImpl
Exception
- If an I/O error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |