|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.fc.Function
public abstract class Function
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
Log |
| 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()
Retrieves used defined context. |
boolean |
getDebug()
|
Log |
getLog()
Returns the logger object in use by this FC |
Object |
getParam(String param)
Gets a named parameter in the configuration. |
RSInterface |
getRSInterface()
Returns the current RSInterface object in use by this Function. |
Component |
getUI()
This method returns null. |
void |
initialize()
Calls initialize(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 a message to the currently used log |
Object |
querySchema(Object source)
This method translates to whatever means a function component has to discover schema for a connection. |
void |
setConfiguration(BaseConfiguration configuration)
This method is/should be called once after the object has been given its configuration |
void |
setContext(Object aContext)
Sets the user defined context. |
void |
setDebug(boolean debug)
Modify the debug mode setting of this component. |
void |
setLog(Log logger)
Sets the logger object to use in this FC |
void |
setParam(String param,
Object value)
Sets a named parameter in the configuration. |
void |
setRSInterface(RSInterface rsi)
Sets the RSInterface object for this Function. |
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 |
|---|
protected Log logger
Log
| Constructor Detail |
|---|
public Function()
| Method Detail |
|---|
public void initialize(Object object)
throws Exception
initialize in interface FunctionInterfaceobject -
Exception
public void terminate()
throws Exception
terminate in interface FunctionInterfaceExceptionpublic void setConfiguration(BaseConfiguration configuration)
setConfiguration in interface FunctionInterfaceconfiguration - BaseConfigurationpublic BaseConfiguration getConfiguration()
getConfiguration in interface FunctionInterfacepublic Component getUI()
getUI in interface FunctionInterface
public boolean updateSchema(FunctionConfig config)
throws Exception
updateSchema in interface FunctionInterfaceconfig - FunctionConfig
Exceptionpublic Object getParam(String param)
getParam in interface FunctionInterfaceparam - the name of the parameter whose value this method returns
public void setParam(String param,
Object value)
setParam in interface FunctionInterfaceparam - The new parameter's namevalue - The new parameter valuepublic void logmsg(String msg)
logmsg in interface FunctionInterfacemsg - The message appearing in the logpublic void setLog(Log logger)
setLog in interface FunctionInterfacelogger - The log objectpublic Log getLog()
getLog in interface FunctionInterface
public void initialize()
throws Exception
Exceptionpublic void debug(String aMsg)
debug in interface FunctionInterfaceaMsg - The message
public void verifyInitialized()
throws Exception
Exception - thrown if initialize() hasn't been calledpublic Object getContext()
getContext in interface FunctionInterfacepublic void setContext(Object aContext)
setContext in interface FunctionInterfaceaContext - String
public Object querySchema(Object source)
throws Exception
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 |
querySchema in interface FunctionInterfacesource - 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.
ExceptionEntry,
Vectorpublic boolean getDebug()
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.
debug - the debug mode settingpublic void setRSInterface(RSInterface rsi)
setRSInterface in interface FunctionInterfacepublic RSInterface getRSInterface()
com.ibm.di.server.RS.getServer()
getRSInterface in interface FunctionInterface
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||