|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.AssemblyLineConnector
public class AssemblyLineConnector
This class uses the AssemblyLineFC function to invoke operations on an AssemblyLine. The behavior of this class depends on the operations defined by the target AssemblyLine. If the target AL has defined connector interface methods that match the connector interface names, this connector will invoke the corresponding operation in the target AL. If a mode ends up in an internal connector interface method with no corresponding operation defined an exception is thrown. The exception is the CallReply mode which is the default for all non-standard modes. A connector interface based adapter AssemblyLine must define operations that correspond to the names found in the connector interface. This means that in order to act as an Iterator it should define "selectentries" and "getnext" as valid operations. This connector will compute the valid modes an AssemblyLine provides by looking at the operation names.
When the target AssemblyLine has its operations invoked through the native connector interface methods (e.g. getnext, selectentries etc) the AssemblyLine connector will provide a work entry with predefined attribute names. These attributes are:
conn - the entry (or entries) passed between this connector and the adapter. The value can be null, a single entry or an array/collection of entries in case there are multiple. search - the search criteria as specified by the user. SeeSearchCriteria
current - the current target object. this
is used when modifying existing entries.
Conversely, when the target AssemblyLine returns data for these
methods/operations it should return an entry with these attribute names.
Field Summary |
---|
Fields inherited from class com.ibm.di.connector.Connector |
---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
Constructor Summary | |
---|---|
AssemblyLineConnector()
The default constructor for this connector. |
Method Summary | |||||||||
---|---|---|---|---|---|---|---|---|---|
void |
deleteEntry(Entry entry,
SearchCriteria search)
This method runs the target AL. |
||||||||
Entry |
findEntry(SearchCriteria search)
This method runs the target AL. |
||||||||
java.util.Vector<java.lang.String> |
getALModes(ConnectorConfig config)
This method checks the defined operations of the target AL and returns them as a Vector of names. |
||||||||
java.util.Vector<java.lang.String> |
getModes(ConnectorConfig config)
This method checks the defined operations of the target AL and returns them as a Vector of names. |
||||||||
Entry |
getNextEntry()
This method runs the target AL. |
||||||||
java.lang.String |
getVersion()
Version information. |
||||||||
void |
initialize(java.lang.Object o)
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. |
||||||||
void |
modEntry(Entry entry,
SearchCriteria search,
Entry old)
This method runs the target AL. |
||||||||
Entry |
performOperation(Entry workEntry,
java.lang.String operation)
This method invokes the named operation in the target AssemblyLine. |
||||||||
Entry |
performOperation(Entry workEntry,
java.lang.String operation,
Entry opentry)
This method invokes the named operation in the target AssemblyLine. |
||||||||
void |
putEntry(Entry entry)
This method runs the target AL. |
||||||||
Entry |
queryReply(Entry entry)
This method runs the target AL. |
||||||||
java.lang.Object |
querySchema(java.lang.Object source)
This function translates to whatever means a connector has to discover schema for a connection. The connector may implement this, in which case a Vector of Entry objects is returned for each column/attribute it discovered. For a database connector this would typically be column names and their attributes. Each Entry in the Vector returned should contain the following attributes:
|
||||||||
void |
selectEntries()
This method prepares the connector if the configured target AL have an operation called "selectEntries" then that operation is invoked. |
||||||||
void |
terminate()
Terminate the connector. This function closes all connection and releases all resources used by the connector. This function also calls the parser's closeParser() method if a parser is active. |
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 |
---|
getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, pushback, queryOperations, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer |
Constructor Detail |
---|
public AssemblyLineConnector()
Method Detail |
---|
public void initialize(java.lang.Object o) throws java.lang.Exception
initialize
in interface ConnectorInterface
initialize
in class Connector
o
- User provided parameter
java.lang.Exception
- if the initialization of this connector fails.public void terminate()
terminate
in interface ConnectorInterface
terminate
in class Connector
public void selectEntries() throws java.lang.Exception
AssemblyLineFC
initialization will take place.
selectEntries
in interface ConnectorInterface
selectEntries
in class Connector
java.lang.Exception
- if error occurs while calling the "selectEntries" operation
of the target AL.public Entry getNextEntry() throws java.lang.Exception
getNextEntry
in interface ConnectorInterface
getNextEntry
in class Connector
java.lang.Exception
- if the connector have been terminated.ConnectorInterface.selectEntries()
public Entry queryReply(Entry entry) throws java.lang.Exception
queryReply
in interface ConnectorInterface
queryReply
in class Connector
entry
- the Entry
object passed as the work entry to the
target AL.
java.lang.Exception
- if an error occurs while executing the target AL.public java.lang.Object querySchema(java.lang.Object source) throws java.lang.Exception
Each Entry in the Vector returned should contain the following attributes:
Name | Value |
---|---|
name | The name of the column/attribute/field .... |
syntax | The syntax or expected value type |
size | If specified this will give the user a hint as to how long the field may be |
querySchema
in interface ConnectorInterface
querySchema
in class Connector
source
- The object on which to discover schema. This may be an Entry
or a string value
java.lang.Exception
- if an error while retrieving the schema occurs.Entry
,
Vector
public java.lang.String getVersion()
getVersion
in interface VersionInfoInterface
public java.util.Vector<java.lang.String> getModes(ConnectorConfig config)
getModes
in class Connector
config
- the configuration object containing parameters used to connect
to a target AL. If this is null
then the
default modes are returned.
public java.util.Vector<java.lang.String> getALModes(ConnectorConfig config)
config
- the configuration object containing parameters used to connect
to a target AL. If this is null
then the
default modes are returned.
public void deleteEntry(Entry entry, SearchCriteria search) throws java.lang.Exception
deleteEntry
in interface ConnectorInterface
deleteEntry
in class Connector
entry
- the Entry
object passed as the work entry to the
target AL.search
- the SearchCriteria
object passed to the target AL as
an attribute of the op-entry.
java.lang.Exception
- if an error occurs while executing the target AL.public Entry findEntry(SearchCriteria search) throws java.lang.Exception
findEntry
in interface ConnectorInterface
findEntry
in class Connector
search
- the SearchCriteria
object passed to the target AL as
an attribute of the op-entry.
Entry
object produced by the target AL.
java.lang.Exception
- if an error occurs while executing the target AL or the
target AL does not have an operation with that name.public void modEntry(Entry entry, SearchCriteria search, Entry old) throws java.lang.Exception
modEntry
in interface ConnectorInterface
modEntry
in class Connector
entry
- the work entry object of the target ALsearch
- the SearchCriteria
object passed to the target AL as
an attribute of the op-entry.old
- the Entry
object passed to the target AL as an
attribute of the op-entry.
java.lang.Exception
- if an error occurs while executing the target AL or the
target AL does not have an operation with that name.public void putEntry(Entry entry) throws java.lang.Exception
putEntry
in interface ConnectorInterface
putEntry
in class Connector
entry
- the work entry object of the target AL
java.lang.Exception
- if an error occurs while executing the target AL or the
target AL does not have an operation with that name.public Entry performOperation(Entry workEntry, java.lang.String operation) throws java.lang.Exception
workEntry
- The work entry provided to the AssemblyLineoperation
- The operation to invoke
java.lang.Exception
- if an error occurs.public Entry performOperation(Entry workEntry, java.lang.String operation, Entry opentry) throws java.lang.Exception
workEntry
- The work entry provided to the AssemblyLineoperation
- The operation to invokeopentry
- the op-entry passed to the target AL.
Entry
object from the executed operation
java.lang.Exception
- if an error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |