com.ibm.di.server
Class FunctionComponent

java.lang.Object
  extended by com.ibm.di.server.AssemblyLineComponent
      extended by com.ibm.di.server.FunctionComponent
All Implemented Interfaces:
Map

public class FunctionComponent
extends AssemblyLineComponent

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


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected  FunctionConfig config
          The IBM Tivoli Directory Integrator configuration of the Function Component
protected  String defaultAttributeName
          The default attribute name.
 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
          The FunctionInterface of this Function Component.
 
Fields inherited from class com.ibm.di.server.AssemblyLineComponent
addmap, CHECKPOINT_GETS, connConfig, connector, connPool, END_OF_DATA, handler, HOOKS_INVOKED, imap, INITIALIZE, initializeCount, LAST_CONN, LAST_ERROR, log, modmap, name, NUM_ADD, NUM_CALLREPLY, NUM_DELETE, NUM_ERRORS, NUM_GET, NUM_GET_TRIES, NUM_GETCLIENT, NUM_GETCLIENT_TRIES, NUM_IGNORED, NUM_LOOKUP, NUM_MODIFY, NUM_NOCHANGE, NUM_SKIPPED, parent, pooledConnector, reusingConnector, SELECT, stats, SUCCESSFUL
 
Constructor Summary
FunctionComponent(AssemblyLine parent, String name, FunctionConfig config)
          Constructor for the FunctionComponent object
FunctionComponent(AssemblyLine parent, String name, FunctionConfig config, FunctionInterface function)
          Constructor for the FunctionComponent object
 
Method Summary
 void callreply(Entry meta)
          This method implements the CallReply mode operation.
 void close()
          This method closes the script engine.
 void doConnectorTerminate()
          This method calls closing hooks and terminates the wrapped function component object.
 void doInitialize()
          This method initializes the component, calls initialization hooks and creates input and output maps.
 FunctionInterface getFunction()
          This method returns the Function interface.
 int getType()
          Gets the type attribute of the FunctionComponent object
 void initialize()
          This method initializes the FunctionComponent, if it should initialized at startup.
 void setDebug(boolean debug)
          This method sets the the debug mode flag.
 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, clear, componentInitialized, containsKey, containsValue, debug, delete, deleteEntry, delta, doConnectorInitialize, dumpEntry, dumpObjects, entrySet, executeOperation, expandParameters, failBack, failOver, get, getBaseConfiguration, getConfig, getConfiguration, getConnector, getConnectorParam, getCriteria, getCurrent, getDebug, getDuplicateEntryCount, getFirstDuplicateEntry, getHandler, getLastEntry, getLastReadEntry, getLog, getName, getnext, getnext, getnextClient, getNextDuplicateEntry, getRestartInfoEntry, getSimulatingState, getStats, handleException, handleSuccess, isCheckpointRestartEnabled, isDeltaMode, isEmpty, isEnabled, isExceptionFatal, isFailOvered, keySet, logmsg, lookup, lookup, mapEntry, modify, pushback, put, putAll, reconnect, remove, reply, resetStatus, setConnectorParam, setCriteria, setCriteria, setCurrent, setDuplicateEntryCount, setErrorObject, setName, setRestartInfoEntry, setSimulatingState, setSuccessful, size, toString, trigger, trigger, trigger, triggerImpl, update, useInputMap, useMap, useMap, useOutputMap, values, verifySchema, wasConfigurationModified, wasSuccessful
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

config

protected FunctionConfig config
The IBM Tivoli Directory Integrator configuration of the Function Component


function

public FunctionInterface function
The reference to the wrapped Function Component object


rtp_function

protected FunctionInterface rtp_function
The FunctionInterface of this Function Component.


defaultAttributeName

protected String defaultAttributeName
The default attribute name.


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 IBM Tivoli Directory Integrator 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
Constructor for the FunctionComponent object

Parameters:
parent - the AssemblyLine instantiating this Function Component
name - the name of this Function Component
config - the IBM Tivoli Directory Integrator configuration of this Function Component
function - the FunctionInterface of this Function Component.
Throws:
Exception - this exception is thrown if the construction of the Function Component object fails
Method Detail

initialize

public void initialize()
                throws Exception
This method initializes the FunctionComponent, if it should initialized at startup.

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

doInitialize

public void doInitialize()
                  throws Exception
This method initializes the component, calls initialization hooks and creates input and output maps.

Throws:
Exception - this exception is thrown if the initialization fails.

close

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

Overrides:
close in class AssemblyLineComponent
Throws:
Exception - if problem occurs

doConnectorTerminate

public void doConnectorTerminate()
                          throws Exception
This method calls closing hooks and terminates the wrapped function component object.

Overrides:
doConnectorTerminate in class AssemblyLineComponent
Throws:
Exception - this exception is thrown if the operation fails.

getFunction

public FunctionInterface getFunction()
This method returns the Function interface.

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

setDebug

public void setDebug(boolean debug)
This method sets the the debug mode flag. May be called by different threads.

Overrides:
setDebug in class AssemblyLineComponent
Parameters:
debug - True to enable debug, false to disable