Package com.ibm.di.fc
Class Function
- java.lang.Object
-
- com.ibm.di.fc.Function
-
- All Implemented Interfaces:
FunctionInterface,VersionInfoInterface
- Direct Known Subclasses:
AssemblyLineFC,Axis2WSClientFC,AxisEasyInvokeSoapWS,AxisJavaToSoap,AxisSoapToJava,CastorJavaToXML,CastorXMLToJava,CBEGeneratorFC,CloseIdMLFC,ComplexTypesGenerator,DataCleanserFC,DeltaFC,EmfSdoToXml,EmfXmlToSdo,FileTransferFC,InitITRegistryFC,InvokeSoapWS,JavaClassFC,MemBufferQFC,OpenIdMLFC,ParserFC,RemoteCmdLineFC,RollingIdMLFC,SapR3RfcFC,SapR3RfcFCV3,ScriptedFC,SendEMailFC,WrapSoap,zOSTSOCommandLine
public abstract class Function extends java.lang.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.
-
-
Constructor Summary
Constructors Constructor Description Function()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(java.lang.String aMsg)Writes a message to the log if debug/detailed logging is turned onBaseConfigurationgetConfiguration()This method returns the function's current configurationjava.lang.ObjectgetContext()Retrieves used defined context.booleangetDebug()LoggetLog()Returns the logger object in use by this FCjava.lang.ObjectgetParam(java.lang.String param)Gets a named parameter in the configuration.RSInterfacegetRSInterface()Returns the current RSInterface object in use by this Function.java.awt.ComponentgetUI()This method returns null.voidinitialize()Calls initialize(null)voidinitialize(java.lang.Object object)This method is/should be called once after the object has been given its configurationvoidlogmsg(java.lang.String msg)Logs a message to the currently used logjava.lang.ObjectquerySchema(java.lang.Object source)This method translates to whatever means a function component has to discover schema for a connection.voidsetConfiguration(BaseConfiguration configuration)This method is/should be called once after the object has been given its configurationvoidsetContext(java.lang.Object aContext)Sets the user defined context.voidsetDebug(boolean debug)Modify the debug mode setting of this component.voidsetLog(Log logger)Sets the logger object to use in this FCvoidsetParam(java.lang.String param, java.lang.Object value)Sets a named parameter in the configuration.voidsetRSInterface(RSInterface rsi)Sets the RSInterface object for this Function.voidterminate()This method is/should be called once before the object is releasedbooleanupdateSchema(FunctionConfig config)This method modifies the schema.voidverifyInitialized()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
-
-
Method Detail
-
initialize
public void initialize(java.lang.Object object) throws java.lang.ExceptionThis method is/should be called once after the object has been given its configuration- Specified by:
initializein interfaceFunctionInterface- Parameters:
object-- Throws:
java.lang.Exception
-
terminate
public void terminate() throws java.lang.ExceptionThis method is/should be called once before the object is released- Specified by:
terminatein interfaceFunctionInterface- Throws:
java.lang.Exception
-
setConfiguration
public void setConfiguration(BaseConfiguration configuration)
This method is/should be called once after the object has been given its configuration- Specified by:
setConfigurationin interfaceFunctionInterface- Parameters:
configuration-BaseConfiguration
-
getConfiguration
public BaseConfiguration getConfiguration()
This method returns the function's current configuration- Specified by:
getConfigurationin interfaceFunctionInterface- Returns:
- BaseConfiguration
-
getUI
public java.awt.Component getUI()
This method returns null.- Specified by:
getUIin interfaceFunctionInterface- Returns:
- null
-
updateSchema
public boolean updateSchema(FunctionConfig config) throws java.lang.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:
updateSchemain interfaceFunctionInterface- Parameters:
config-FunctionConfig- Returns:
- boolean
- Throws:
java.lang.Exception
-
getParam
public java.lang.Object getParam(java.lang.String param)
Gets a named parameter in the configuration.- Specified by:
getParamin interfaceFunctionInterface- Parameters:
param- the name of the parameter whose value this method returns- Returns:
- the value of the parameter
-
setParam
public void setParam(java.lang.String param, java.lang.Object value)Sets a named parameter in the configuration.- Specified by:
setParamin interfaceFunctionInterface- Parameters:
param- The new parameter's namevalue- The new parameter value
-
logmsg
public void logmsg(java.lang.String msg)
Logs a message to the currently used log- Specified by:
logmsgin interfaceFunctionInterface- 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:
setLogin interfaceFunctionInterface- Parameters:
logger- The log object
-
getLog
public Log getLog()
Returns the logger object in use by this FC- Specified by:
getLogin interfaceFunctionInterface- Returns:
- The log object
-
initialize
public void initialize() throws java.lang.ExceptionCalls initialize(null)- Throws:
java.lang.Exception
-
debug
public void debug(java.lang.String aMsg)
Writes a message to the log if debug/detailed logging is turned on- Specified by:
debugin interfaceFunctionInterface- Parameters:
aMsg- The message
-
verifyInitialized
public void verifyInitialized() throws java.lang.ExceptionVerifies that initialize() has been called at least once after the FC has been loaded or the terminate() method has been called.- Throws:
java.lang.Exception- thrown if initialize() hasn't been called
-
getContext
public java.lang.Object getContext()
Retrieves used defined context.- Specified by:
getContextin interfaceFunctionInterface- Returns:
- the user defined context.
-
setContext
public void setContext(java.lang.Object aContext)
Sets the user defined context.- Specified by:
setContextin interfaceFunctionInterface- Parameters:
aContext- String
-
querySchema
public java.lang.Object querySchema(java.lang.Object source) throws java.lang.ExceptionThis 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 - Specified by:
querySchemain interfaceFunctionInterface- 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
-
getDebug
public boolean getDebug()
- Returns:
- Whether this component is in debug mode. May be called by different threads.
- Since:
- 7.0
-
setDebug
public void setDebug(boolean debug)
Modify the debug mode setting of this component. May be called by different threads.
This method is for internal use only. Do not call it from user code.
- Parameters:
debug- the debug mode setting- Since:
- 7.0
-
setRSInterface
public void setRSInterface(RSInterface rsi)
Sets the RSInterface object for this Function.- Specified by:
setRSInterfacein interfaceFunctionInterface
-
getRSInterface
public RSInterface getRSInterface()
Returns the current RSInterface object in use by this Function. If not set, returncom.ibm.di.server.RS.getServer()- Specified by:
getRSInterfacein interfaceFunctionInterface- Returns:
- Function's RSInterface object
-
-