com.ibm.di.fc
Class Function

java.lang.Object
  extended by com.ibm.di.fc.Function
All Implemented Interfaces:
FunctionInterface, VersionInfoInterface
Direct Known Subclasses:
AssemblyLineFC, AxisEasyInvokeSoapWS, AxisJavaToSoap, AxisSoapToJava, CastorJavaToXML, CastorXMLToJava, CBEGeneratorFC, ComplexTypesGenerator, EmfSdoToXml, EmfXmlToSdo, InvokeSoapWS, JavaClassFC, MemBufferQFC, ParserFC, RemoteCmdLineFC, SapR3RfcFC, ScriptedFC, SendEMailFC, WrapSoap, zOSTSOCommandLine

public abstract class Function
extends Object
implements FunctionInterface, VersionInfoInterface

This abstract class contains a default implementation of all methods in the FunctionInterface except the the perform(obj) method. Every Function Component implementation class should inherit from this class.


Field Summary
protected  Log logger
           
 
Constructor Summary
Function()
           
 
Method Summary
 void debug(String aMsg)
          Writes a message to the log if debug/detailed logging is turned on
 BaseConfiguration getConfiguration()
          This method returns the function's current configuration
 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()
          Calls inititialize(null)
 void initialize(Object object)
          This method is/should be called once after the object has been given its configuration
 void logmsg(String msg)
          Logs the msg string value to the currently used log
 void setConfiguration(BaseConfiguration configuration)
          This method is/should be called once after the object has been given its configuration
 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()
          This method is/should be called once before the object is released
 boolean updateSchema(FunctionConfig config)
          This method modifies the schema.
 void verifyInitialized()
          Verifies that initialize() has been called at least once after the FC has been loaded or the terminate() method has been called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.di.fc.FunctionInterface
perform
 
Methods inherited from interface com.ibm.di.server.VersionInfoInterface
getVersion
 

Field Detail

logger

protected Log logger
Constructor Detail

Function

public Function()
Method Detail

initialize

public void initialize(Object object)
                throws Exception
This method is/should be called once after the object has been given its configuration

Specified by:
initialize in interface FunctionInterface
Parameters:
object - this object provides information to the Function Component needed on initialization
Throws:
Exception - An exception is thrown if the initialization fails.

terminate

public void terminate()
               throws Exception
This method is/should be called once before the object is released

Specified by:
terminate in interface FunctionInterface
Throws:
Exception - An exception is thrown if this method fails.

setConfiguration

public void setConfiguration(BaseConfiguration configuration)
This method is/should be called once after the object has been given its configuration

Specified by:
setConfiguration in interface FunctionInterface
Parameters:
configuration - The new configuration value

getConfiguration

public BaseConfiguration getConfiguration()
This method returns the function's current configuration

Specified by:
getConfiguration in interface FunctionInterface
Returns:
The configuration value

getUI

public Component getUI()
This method returns the user interface component presented to the user to configure the operational configuration of the function.

Specified by:
getUI in interface FunctionInterface
Returns:
The uI value

updateSchema

public boolean updateSchema(FunctionConfig config)
                     throws Exception
This method modifies the schema. The intent is to allow the FC to provide a dynamic schema definition based on a given configuration. The default implementation simply ignores the call.

Specified by:
updateSchema in interface FunctionInterface
Throws:
Exception

getParam

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

Specified by:
getParam in interface FunctionInterface
Parameters:
param - The name of the parameter
Returns:
The param value

setParam

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

Specified by:
setParam in interface FunctionInterface
Parameters:
param - The new param value
value - The new param value

logmsg

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

Specified by:
logmsg in interface FunctionInterface
Parameters:
msg - The message appearing in the log

setLog

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

Specified by:
setLog in interface FunctionInterface
Parameters:
logger - The log object

getLog

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

Specified by:
getLog in interface FunctionInterface
Returns:
The log object

initialize

public void initialize()
                throws Exception
Calls inititialize(null)

Throws:
Exception

debug

public void debug(String aMsg)
Writes a message to the log if debug/detailed logging is turned on

Specified by:
debug in interface FunctionInterface
Parameters:
aMsg - The message

verifyInitialized

public void verifyInitialized()
                       throws Exception
Verifies that initialize() has been called at least once after the FC has been loaded or the terminate() method has been called.

Throws:
Exception - thrown if initialize() hasn't been called

getContext

public Object getContext()
Specified by:
getContext in interface FunctionInterface

setContext

public void setContext(Object aContext)
Specified by:
setContext in interface FunctionInterface