Class 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 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 Component
        name - the name of this Function Component
        config - 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 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:
        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 class AssemblyLineComponent
        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 class AssemblyLineComponent
        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 class AssemblyLineComponent
        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 class AssemblyLineComponent
        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 class AssemblyLineComponent
        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 class AssemblyLineComponent
        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 class AssemblyLineComponent
        Parameters:
        debug - True to enable debug, false to disable