Package com.ibm.di.server
Class FunctionComponent
- java.lang.Object
-
- com.ibm.di.server.AssemblyLineComponent
-
- com.ibm.di.server.FunctionComponent
-
- All Implemented Interfaces:
java.util.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.
-
-
Field Summary
Fields Modifier and Type Field Description protected FunctionConfig
config
The IBM Tivoli Directory Integrator configuration of the Function Componentprotected java.lang.String
defaultAttributeName
The default attribute name.FunctionInterface
function
The reference to the wrapped Function Component objectprotected AttributeMapping
omap
This is the object performing output attribute mappingprotected 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, SELECT, stats, SUCCESSFUL
-
-
Constructor Summary
Constructors Constructor Description FunctionComponent(AssemblyLine parent, java.lang.String name, FunctionConfig config)
Constructor for the FunctionComponent objectFunctionComponent(AssemblyLine parent, java.lang.String name, FunctionConfig config, FunctionInterface function)
Constructor for the FunctionComponent object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 objectvoid
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, doConnectorTerminate, 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, useAttributeMap, useAttributeMap, useAttributeMap, useInputMap, useMap, useMap, useOutputMap, values, verifySchema, wasConfigurationModified, wasSuccessful
-
-
-
-
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 java.lang.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, java.lang.String name, FunctionConfig config) throws java.lang.Exception
Constructor for the FunctionComponent object- Parameters:
parent
- the AssemblyLine instantiating this Function Componentname
- the name of this Function Componentconfig
- the IBM Tivoli Directory Integrator configuration of this Function Component- Throws:
java.lang.Exception
- this exception is thrown if the construction of the Function Component object fails
-
FunctionComponent
public FunctionComponent(AssemblyLine parent, java.lang.String name, FunctionConfig config, FunctionInterface function) throws java.lang.Exception
Constructor for the FunctionComponent object- Parameters:
parent
- the AssemblyLine instantiating this Function Componentname
- the name of this Function Componentconfig
- the IBM Tivoli Directory Integrator configuration of this Function Componentfunction
- the FunctionInterface of this Function Component.- Throws:
java.lang.Exception
- this exception is thrown if the construction of the Function Component object fails
-
-
Method Detail
-
initialize
public void initialize() throws java.lang.Exception
This method initializes the FunctionComponent, if it should initialized at startup.- Overrides:
initialize
in classAssemblyLineComponent
- Throws:
java.lang.Exception
- this exception is thrown if the initialization of this Function Component fails
-
doInitialize
public void doInitialize() throws java.lang.Exception
This method initializes the component, calls initialization hooks and creates input and output maps.- Throws:
java.lang.Exception
- this exception is thrown if the initialization fails.
-
close
public void close() throws java.lang.Exception
This method closes the script engine.- Overrides:
close
in classAssemblyLineComponent
- Throws:
java.lang.Exception
- if problem occurs
-
doConnectorTerminate
public void doConnectorTerminate() throws java.lang.Exception
This method calls closing hooks and terminates the wrapped function component object.- Overrides:
doConnectorTerminate
in classAssemblyLineComponent
- Throws:
java.lang.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 classAssemblyLineComponent
- Returns:
- The type value
-
willExecute
public boolean willExecute(Entry work) throws java.lang.Exception
Return true/false if this component should be executed.- Overrides:
willExecute
in classAssemblyLineComponent
- Parameters:
work
- The current work Entry- Returns:
- True if this component is enabled
- Throws:
java.lang.Exception
- Any exception thrown by the executed Hook
-
callreply
public void callreply(Entry meta) throws java.lang.Exception
This method implements the CallReply mode operation.- Overrides:
callreply
in classAssemblyLineComponent
- Parameters:
meta
- The work entry to send- Throws:
java.lang.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 classAssemblyLineComponent
- Parameters:
debug
- True to enable debug, false to disable
-
-