Version

    JavaExecute

    Deprecated Component

    JavaExecute 64x64

    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.

    Same input metadata Sorted inputs Inputs Outputs Each to all outputs Java CTL Auto-propagated metadata

    -

    -

    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 JavaRunnable interface.

    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) through TransformationGraph.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.