JavaExecute
Deprecated Component
Short Description |
Ports |
JavaExecute Attributes |
Details |
Best Practices |
Compatibility |
See also |
Short Description
JavaExecute executes Java commands.
JavaExecute is deprecated. Use CustomJavaComponent instead of JavaExecute.
Component | Same input metadata | Sorted inputs | Inputs | Outputs | Each to all outputs | Java | CTL | Auto-propagated metadata |
---|---|---|---|---|---|---|---|---|
JavaExecute | - | - | 0 | 0 | - | - |
Ports
JavaExecute has neither an input nor output port.
JavaExecute Attributes
Attribute | Req | Description | Possible values |
---|---|---|---|
Basic | |||
Runnable | [1] | Runnable transformation in Java defined in the graph. | |
Runnable URL | [1] | The external file defining the runnable transformation in Java. | |
Runnable class | [1] | An external runnable transformation class. | |
Runnable source charset |
Encoding of the external file defining the transformation. The default encoding depends on DEFAULT_SOURCE_CODE_CHARSET in defaultProperties. | E.g. UTF-8 | |
Advanced | |||
Properties | Properties to be used when executing a Java command. | ||
[1] One of these must be set. These transformation attributes
must be specified. Any of these transformation attributes implements a
See Java Interfaces for JavaExecute for more information. See also Defining Transformations for detailed information about transformations. |
Details
JavaExecute executes Java commands.
A runnable transformation, which is required in the component,
implements a JavaRunnable
interface and inherits other common methods from the Transform
interface.
See Common Java Interfaces.
Below is the list of
JavaRunnable
interface methods.
See Java Interfaces for JavaExecute for more information.
Java Interfaces for JavaExecute
A runnable transformation, which is required in the component, implements
a JavaRunnable
interface and inherits other common methods from the Transform
interface.
See Common Java Interfaces.
Following are the methods of the JavaRunnable
interface:
boolean init(Properties parameters)
Initializes a Java class/function. This method is called only once at the beginning of the transformation process. Any object allocation/initialization should happen here.
void free()
This is a de-initialization method for this graph element. All resources allocated in the
init()
method should be released here. This method is invoked only once at the end of the element existence.void run()
The core method, which holds the implementation of the Java code to be run by the JavaExecute component.
void setGraph(TransformationGraph graph)
A method which passes into the transformation graph instance within which the transformation will be executed. Since
TransformationGraph
singleton pattern was removed, it is NO longer POSSIBLE to access graph's parameters and other elements (e.g. metadata definitions) throughTransformationGraph.getInstance()
.
Best Practices
If the transformation is specified in an external file (with Runnable URL), we recommend users to explicitly set Runnable source charset.
Compatibility
Version | Compatibility Notice |
---|---|
4.1.0-M1 | JavaExecute was deprecated. Use CustomJavaComponent instead. |