Package com.ibm.di.fc
Class JavaClassFC
- java.lang.Object
-
- com.ibm.di.fc.Function
-
- com.ibm.di.fc.JavaClassFC
-
- All Implemented Interfaces:
FunctionInterface,VersionInfoInterface
public class JavaClassFC extends Function
This is a function component that calls a generic java method.
-
-
Constructor Summary
Constructors Constructor Description JavaClassFC()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetInstance()Return the instance that is used when invoking the method.java.lang.String[]getMethods()Return a list of method names in our javaClass.java.lang.StringgetVersion()Version information.voidinitialize(java.lang.Object obj)Called once to initialize the functionjava.lang.Objectperform(java.lang.Object obj)Makes a call to the java method.voidsetInstance(java.lang.Object obj)Sets the instance that will be used when invoking the method.booleanupdateSchema(FunctionConfig config)This method modifies the schema in the provided configuration.-
Methods inherited from class com.ibm.di.fc.Function
debug, getConfiguration, getContext, getDebug, getLog, getParam, getRSInterface, getUI, initialize, logmsg, querySchema, setConfiguration, setContext, setDebug, setLog, setParam, setRSInterface, terminate, verifyInitialized
-
-
-
-
Method Detail
-
initialize
public void initialize(java.lang.Object obj) throws java.lang.ExceptionCalled once to initialize the function- Specified by:
initializein interfaceFunctionInterface- Overrides:
initializein classFunction- Parameters:
obj- Additional information- Throws:
java.lang.Exception- If the configuration is not complete, or the class or method cannot be found
-
setInstance
public void setInstance(java.lang.Object obj)
Sets the instance that will be used when invoking the method. By default an instance created using the empty constructor will be used.- Parameters:
obj- The instance to use
-
getInstance
public java.lang.Object getInstance()
Return the instance that is used when invoking the method.- Returns:
- The instance used
-
perform
public java.lang.Object perform(java.lang.Object obj) throws java.lang.ExceptionMakes a call to the java method.- Parameters:
obj- An Entry containing the values of the parameters- Returns:
- The result of calling the method
- Throws:
java.lang.Exception- If no method is found. If parameters are needed, and obj is not an Entry.
-
getVersion
public java.lang.String getVersion()
Description copied from interface:VersionInfoInterfaceVersion information.- Returns:
- version information
-
getMethods
public java.lang.String[] getMethods()
Return a list of method names in our javaClass. Used by the Config Editor.- Returns:
- a String[] containing names of all methods.
-
updateSchema
public 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. Note: changes the configuration of this component- Specified by:
updateSchemain interfaceFunctionInterface- Overrides:
updateSchemain classFunction- Parameters:
config- - The new FunctionConfig to use- Returns:
- - true if the schema was successfully updated
- Throws:
java.lang.Exception- : never
-
-