Package com.ibm.di.fc
Interface FunctionInterface
-
- All Known Implementing Classes:
AssemblyLineFC
,Axis2WSClientFC
,AxisEasyInvokeSoapWS
,AxisJavaToSoap
,AxisSoapToJava
,CastorJavaToXML
,CastorXMLToJava
,CBEGeneratorFC
,CloseIdMLFC
,ComplexTypesGenerator
,DataCleanserFC
,DeltaFC
,EmfSdoToXml
,EmfXmlToSdo
,FileTransferFC
,Function
,InitITRegistryFC
,InvokeSoapWS
,JavaClassFC
,MemBufferQFC
,OpenIdMLFC
,ParserFC
,RemoteCmdLineFC
,RollingIdMLFC
,SapR3RfcFC
,SapR3RfcFCV3
,ScriptedFC
,SendEMailFC
,WrapSoap
,zOSTSOCommandLine
public interface FunctionInterface
This is the interface implemented by Function objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
debug(java.lang.String aMsg)
If debug is turned on, logs a message to the currently used log.BaseConfiguration
getConfiguration()
Gets the configuration attribute of the FunctionInterface objectjava.lang.Object
getContext()
Retrieves used defined context.Log
getLog()
Returns the logger object in use by this FCjava.lang.Object
getParam(java.lang.String param)
Gets a named parameter in the configuration.RSInterface
getRSInterface()
Returns the current RSInterface object in use by this Function.java.awt.Component
getUI()
Deprecated.void
initialize(java.lang.Object obj)
Called once to initialize the functionvoid
logmsg(java.lang.String msg)
Logs a message to the currently used logjava.lang.Object
perform(java.lang.Object obj)
This is the main method of a Function Component.java.lang.Object
querySchema(java.lang.Object source)
This method translates to whatever means a function component has to discover schema for a connection.void
setConfiguration(BaseConfiguration config)
Sets the configuration attribute of the FunctionInterface objectvoid
setContext(java.lang.Object aContext)
Sets the user defined context.void
setLog(Log logger)
Sets the logger object to use in this FCvoid
setParam(java.lang.String param, java.lang.Object value)
Sets a named parameter in the configuration.void
setRSInterface(RSInterface rsi)
Sets the RSInterface object for this Function.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(java.lang.Object obj) throws java.lang.Exception
Called once to initialize the function- Parameters:
obj
- this object provides information to the Function Component needed on initialization- Throws:
java.lang.Exception
- An exception is thrown if the initialization fails.
-
perform
java.lang.Object perform(java.lang.Object obj) throws java.lang.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:
java.lang.Exception
- An exception is thrown if this method fails.
-
terminate
void terminate() throws java.lang.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:
java.lang.Exception
- An exception is thrown if this method fails.
-
getUI
java.awt.Component getUI()
Deprecated.This method returns null.- Returns:
- null
-
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 java.lang.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.- Parameters:
config
-FunctionConfig
- Returns:
- boolean
- Throws:
java.lang.Exception
-
getParam
java.lang.Object getParam(java.lang.String param)
Gets a named parameter in the configuration.- Parameters:
param
- the name of the parameter whose value this method returns- Returns:
- the value of the parameter
-
setParam
void setParam(java.lang.String param, java.lang.Object value)
Sets a named parameter in the configuration.- Parameters:
param
- The new parameter's namevalue
- The new parameter value
-
logmsg
void logmsg(java.lang.String msg)
Logs a message 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 in use by this FC- Returns:
- The log object
-
debug
void debug(java.lang.String aMsg)
If debug is turned on, logs a message to the currently used log.- Parameters:
aMsg
- The debug message appearing in the log
-
getContext
java.lang.Object getContext()
Retrieves used defined context.- Returns:
- the user defined context.
-
setContext
void setContext(java.lang.Object aContext)
Sets the user defined context.- Parameters:
aContext
- String
-
querySchema
java.lang.Object querySchema(java.lang.Object source) throws java.lang.Exception
This method translates to whatever means a function component has to discover schema for a connection. The specific FC may implement this, in which case a Vector of Entry objects is returned for each column/attribute it discovered.Each Entry in the Vector returned should contain the following attributes:
Name Value name The name of the column/attribute/field .... syntax The syntax or expected value type size If specified this will give the user a hint as to how long the field may be - Parameters:
source
- The object on which to discover schema. This may be an Entry or a string value. Boolean value will tell which schema to discover: true - InputMapSchema, false - OutputMapSchema. If not specified the default will be true. Might be a FunctionConfig object which will be set as the configuration of this object. Could be an array of objects (i.e. Object[]). Only the first object of a specific type will be considered, the rest (if any) will be ignored.- Returns:
- A Vector of com.ibm.di.entry.Entry objects describing each entity
- Throws:
java.lang.Exception
- See Also:
Entry
,Vector
-
setRSInterface
void setRSInterface(RSInterface rsi)
Sets the RSInterface object for this Function.- Since:
- 7.0
-
getRSInterface
RSInterface getRSInterface()
Returns the current RSInterface object in use by this Function. If not set, returncom.ibm.di.server.RS.getServer()
- Returns:
- Function's RSInterface object
- Since:
- 7.0
-
-