Package com.ibm.di.connector
Class FormEntryConnector
- java.lang.Object
-
- com.ibm.di.connector.Connector
-
- com.ibm.di.connector.FormEntryConnector
-
- All Implemented Interfaces:
ConnectorInterface
,VersionInfoInterface
public class FormEntryConnector extends Connector implements ConnectorInterface
This connector feeds an AssemblyLine with entries provided as raw data. It has two parameters:
isLoop
- flag that enables looping trough the input data.
entryRawData
- the input entries saved in UTF-8 format; this content can be set at runtime, by using setParam().
-
-
Field Summary
-
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
-
-
Constructor Summary
Constructors Constructor Description FormEntryConnector()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Entry
getNextEntry()
Returns the next Entry from the connector.java.lang.String
getVersion()
Version information.void
initialize(java.lang.Object o)
Initialize the connector.void
readRaw()
This method read raw entries using the provided parser.void
selectEntries()
Prepare the Connector for sequential read.-
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, deleteEntry, extractExceptionInformation, findEntry, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextClient, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, getUI, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logError, logmsg, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, querySchema, queryTables, reconnect, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setDebugMode, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface, terminate, terminateServer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.di.connector.ConnectorInterface
deleteEntry, findEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminate, terminateServer
-
-
-
-
Method Detail
-
initialize
public void initialize(java.lang.Object o) throws java.lang.Exception
Initialize the connector. The connector may be passed a parameter of any kind by the user. It is up to the connector to determine whether this object can be used or not. The parameter is typically provided by a user script. When an AssemblyLine initializes it's Connectors, they are passed a ConnectorMode object.- Specified by:
initialize
in interfaceConnectorInterface
- Overrides:
initialize
in classConnector
- Parameters:
o
- User provided parameter- Throws:
java.lang.Exception
- if the initialization of this connector fails.
-
selectEntries
public void selectEntries() throws java.lang.Exception
Prepare the Connector for sequential read. If necessary, create a result set to be used for getNextEntry(). When the Connector is used as an Iterator in an AssemblyLine, this method will be called. Default is an empty method.- Specified by:
selectEntries
in interfaceConnectorInterface
- Overrides:
selectEntries
in classConnector
- Throws:
java.lang.Exception
- if an error occurs.
-
getNextEntry
public Entry getNextEntry() throws java.lang.Exception
Returns the next Entry from the connector. The entry is populated with attributes and values from the next entry in the input set.Example:
var ctor = input.getConnector(); var entry = ctor.getNextEntry(); for (; entry != null; entry = ctor.getNextEntry()) { main.logmsg("Read entry..."); main.dumpEntry(entry); }
- Specified by:
getNextEntry
in interfaceConnectorInterface
- Overrides:
getNextEntry
in classConnector
- Returns:
- - the next Entry, or null if no more data
- Throws:
java.lang.Exception
- if an error occurs.- See Also:
ConnectorInterface.selectEntries()
-
readRaw
public void readRaw() throws java.lang.Exception
This method read raw entries using the provided parser.- Throws:
java.lang.Exception
- if a parser is not configured or the exception is derived from the parser
-
getVersion
public java.lang.String getVersion()
Version information.- Specified by:
getVersion
in interfaceVersionInfoInterface
- Returns:
- version information
-
-