com.ibm.di.server
Class FunctionComponent

java.lang.Object
  extended by com.ibm.di.server.AssemblyLineComponent
      extended by com.ibm.di.server.FunctionComponent

public class FunctionComponent
extends AssemblyLineComponent

This is a wrapper class for TDI Function Components. Objects of this class are instantiated by the AssemblyLine, as the AssemblyLine only works with AssemblyLineComponent objects, not Connectors, Functions Components, etc.


Field Summary
protected  FunctionConfig config
          The TDI configuration of the Function Component
protected  String defaultAttributeName
           
 FunctionInterface function
          The reference to the wrapped Function Component object
protected  AttributeMapping omap
          This is the object performing output attribute mapping
protected  FunctionInterface rtp_function
           
 
Fields inherited from class com.ibm.di.server.AssemblyLineComponent
addmap, CHECKPOINT_GETS, connConfig, connector, connPool, handler, imap, INITIALIZE, log, modmap, name, parent, pooledConnector, restartCycle, reusingConnector, SELECT, stats
 
Constructor Summary
FunctionComponent(AssemblyLine parent, String name, FunctionConfig config)
          Constructor for the FunctionComponent object
FunctionComponent(AssemblyLine parent, String name, FunctionConfig config, FunctionInterface function)
           
 
Method Summary
 void callreply(Entry meta)
          This method implements the CallReply mode operation.
 void close()
          This method closes the script engine.
 ConnectorConfig getConfiguration()
          This method returns the Connector configuration
 FunctionInterface getFunction()
          This method returns the Function interface
 int getType()
          Gets the type attribute of the FunctionComponent object
 void initialize()
          This method initializes the script engine.
 boolean willExecute(Entry work)
          Return true/false if this component should be executed.
 
Methods inherited from class com.ibm.di.server.AssemblyLineComponent
add, checkInitialize, checkTerminate, debug, delete, deleteEntry, delta, doConnectorInitialize, doConnectorTerminate, dumpEntry, dumpObjects, expandParameters, getBaseConfiguration, getConfig, getConnector, getConnectorParam, getCriteria, getCurrent, getDebug, getDuplicateEntryCount, getFirstDuplicateEntry, getHandler, getLastEntry, getLastReadEntry, getLog, getName, getnext, getnext, getnextClient, getNextDuplicateEntry, getRestartInfoEntry, getStats, handleException, handleSuccess, isCheckpointRestartEnabled, isDeltaMode, isEnabled, isExceptionFatal, logmsg, lookup, lookup, mapEntry, modify, pushback, reconnect, reply, setConnectorParam, setCriteria, setCriteria, setCurrent, setDebug, setDuplicateEntryCount, setErrorObject, setName, setRestartInfoEntry, trigger, trigger, trigger, update, verifySchema, wasConfigurationModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected FunctionConfig config
The TDI configuration of the Function Component


function

public FunctionInterface function
The reference to the wrapped Function Component object


rtp_function

protected FunctionInterface rtp_function

defaultAttributeName

protected String defaultAttributeName

omap

protected AttributeMapping omap
This is the object performing output attribute mapping

Constructor Detail

FunctionComponent

public FunctionComponent(AssemblyLine parent,
                         String name,
                         FunctionConfig config)
                  throws Exception
Constructor for the FunctionComponent object

Parameters:
parent - the AssemblyLine instantiating this Function Component
name - the name of this Function Component
config - the TDI configuration of this Function Component
Throws:
Exception - this exception is thrown if the construction of the Function Component object fails

FunctionComponent

public FunctionComponent(AssemblyLine parent,
                         String name,
                         FunctionConfig config,
                         FunctionInterface function)
                  throws Exception
Throws:
Exception
Method Detail

initialize

public void initialize()
                throws Exception
This method initializes the script engine.

Overrides:
initialize in class AssemblyLineComponent
Throws:
Exception - this exception is thrown if the initialization of this Function Component fails

close

public void close()
           throws Exception
This method closes the script engine.

Overrides:
close in class AssemblyLineComponent
Throws:
Exception

getConfiguration

public ConnectorConfig getConfiguration()
This method returns the Connector configuration

Overrides:
getConfiguration in class AssemblyLineComponent
Returns:
The configuration value

getFunction

public FunctionInterface getFunction()
This method returns the Function interface


getType

public int getType()
Gets the type attribute of the FunctionComponent object

Overrides:
getType in class AssemblyLineComponent
Returns:
The type value

willExecute

public boolean willExecute(Entry work)
                    throws Exception
Return true/false if this component should be executed.

Overrides:
willExecute in class AssemblyLineComponent
Parameters:
work - The current work Entry
Returns:
True if this component is enabled
Throws:
Exception - Any exception thrown by the executed Hook

callreply

public void callreply(Entry meta)
               throws Exception
This method implements the CallReply mode operation.

Overrides:
callreply in class AssemblyLineComponent
Parameters:
meta - The work entry to send
Throws:
Exception - this exception is thrown if this method fails