com.ibm.di.fc
Interface FunctionInterface

All Known Implementing Classes:
AssemblyLineFC, AxisEasyInvokeSoapWS, AxisJavaToSoap, AxisSoapToJava, CastorJavaToXML, CastorXMLToJava, CBEGeneratorFC, ComplexTypesGenerator, EmfSdoToXml, EmfXmlToSdo, Function, InvokeSoapWS, JavaClassFC, MemBufferQFC, ParserFC, QA_RemoteCmdLineFC, RemoteCmdLineFC, SapR3RfcFC, ScriptedFC, SendEMailFC, WrapSoap, zOSTSOCommandLine

public interface FunctionInterface

This is the interface implemented by Function objects.


Method Summary
 void debug(String aMsg)
          If debug is turned on, logs the aMsg string value to the currently used log.
 BaseConfiguration getConfiguration()
          Gets the configuration attribute of the FunctionInterface object
 Object getContext()
           
 Log getLog()
          Returns the logger object i use by this FC
 Object getParam(String param)
          Gets the param attribute of the FunctionInterface object
 Component getUI()
          This method returns the user interface component presented to the user to configure the operational configuration of the function.
 void initialize(Object obj)
          Called once to initialize the function
 void logmsg(String msg)
          Logs the msg string value to the currently used log
 Object perform(Object obj)
          This is the main method of a Function Component.
 void setConfiguration(BaseConfiguration config)
          Sets the configuration attribute of the FunctionInterface object
 void setContext(Object aContext)
           
 void setLog(Log logger)
          Sets the logger object to use in this FC
 void setParam(String param, Object value)
          Sets the param attribute of the FunctionInterface object
 void terminate()
          The implementation of this method must take care to cleanup any resources which the Function Component has allocated during its operation.
 boolean updateSchema(FunctionConfig config)
          This method modifies the schema in the provided configuration.
 

Method Detail

initialize

void initialize(Object obj)
                throws Exception
Called once to initialize the function

Parameters:
obj - this object provides information to the Function Component needed on initialization
Throws:
Exception - An exception is thrown if the initialization fails.

perform

Object perform(Object obj)
               throws Exception
This is the main method of a Function Component. This method is called for the Function Component to actually do its job. The implementation of this methods performs the function which the Function Component was created to do.

Parameters:
obj - the input to the function
Returns:
the output from the function
Throws:
Exception - An exception is thrown if this method fails.

terminate

void terminate()
               throws Exception
The implementation of this method must take care to cleanup any resources which the Function Component has allocated during its operation. Software modules which use a Function Component must make sure they call this method so that all resources used by the Function Component are freed properly.

Throws:
Exception - An exception is thrown if this method fails.

getUI

Component getUI()
This method returns the user interface component presented to the user to configure the operational configuration of the function. If the function returns a null value the UI is tried constructed by loading a Form with the exact name as the implementing java class. If no form exists, then the function is headless with no UI configuation.

Returns:
The uI value

getConfiguration

BaseConfiguration getConfiguration()
Gets the configuration attribute of the FunctionInterface object

Returns:
The configuration value

setConfiguration

void setConfiguration(BaseConfiguration config)
Sets the configuration attribute of the FunctionInterface object

Parameters:
config - The new configuration value

updateSchema

boolean updateSchema(FunctionConfig config)
                     throws Exception
This method modifies the schema in the provided configuration. The intent is to allow the FC to provide a schema definition dynamically based on a given configuration.

Throws:
Exception

getParam

Object getParam(String param)
Gets the param attribute of the FunctionInterface object

Parameters:
param - the name of the parameter whose value this method returns
Returns:
the value of the parameter

setParam

void setParam(String param,
              Object value)
Sets the param attribute of the FunctionInterface object

Parameters:
param - The new param value
value - The new param value

logmsg

void logmsg(String msg)
Logs the msg string value to the currently used log

Parameters:
msg - The message appearing in the log

setLog

void setLog(Log logger)
Sets the logger object to use in this FC

Parameters:
logger - The log object

getLog

Log getLog()
Returns the logger object i use by this FC

Returns:
The log object

debug

void debug(String aMsg)
If debug is turned on, logs the aMsg string value to the currently used log.

Parameters:
aMsg - The debug message appearing in the log

getContext

Object getContext()

setContext

void setContext(Object aContext)