JavaExecute
Deprecated Component
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 |
Runnable transformation in Java defined in the graph. |
||
Runnable URL |
The external file defining the runnable transformation in Java. |
||
Runnable class |
An external runnable transformation class. |
||
Runnable source charset |
Encoding of the external file defining the transformation. The default encoding depends on |
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 |
For more information, see Java Interfaces for JavaExecute.
For detailed information about transformations, see also Defining 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.
For more information, see Java Interfaces for JavaExecute.
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. |