You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`environmentClass`| String |`io.jactl.DefaultEnv`| The name of the class which will is used to encapsulate the Jactl runtime environment. See [Integration Guide](integration-guide) for more details. |
396
-
|`extraJars`| List |`[]`| A list of file names for any additional JARs that should be added to the classpath. |
397
-
|`functionClasses`| List |`[]`| A list of classes having a static method called `registerFunctions(JactlEnv env)` that will be invoked at start up. This allows you to dynamically add new functions (from one of the `extraJars` files) to the Jactl runtime. |
|`environmentClass`| String |`io.jactl.DefaultEnv`| The name of the class which will is used to encapsulate the Jactl runtime environment. See [Integration Guide](integration-guide) for more details. |
396
+
|`extraJars`| List |`[]`| A list of file names for any additional JARs that should be added to the classpath.|
397
+
|`functionClasses`| List |`[]`| A list of classes having a static method called `registerFunctions(JactlEnv env)` that will be invoked at start up. This allows you to dynamically add new functions (from one of the `extraJars` files) to the Jactl runtime. |
398
398
399
399
For example, there is a [jactl-vertx project](https://github.com/jaccomoc/jactl-vertx) for use when integrating
400
400
with a [Vert.x](https://vertx.io/) based application.
401
401
It uses a specific `JactlVertxEnv` environment that delegates event scheduling to Vert.x and provides some
402
-
Json methods for converting to/from JSON and an example function for sending/receiving JSON messages over HTTP.
402
+
global functions that deal with distributed maps and an example function for sending/receiving JSON messages over HTTP.
403
403
404
404
Since the `sendReceiveJson()` functions is provided as an example, it lives in the test jar of the jactl-vertx
405
405
project.
406
-
So to include these additional functions in your Jactl REPL or Jactl command line scripts you need to list
406
+
So to include all of these additional functions in your Jactl REPL or Jactl command line scripts you need to list
407
407
these two jars in the `extraJars` list.
408
408
409
409
> **Note**<br/>
410
-
> The `jactl-vertx` test jar is built as an "uber" jar and includes the dependencies it needs (including the
410
+
> The `jactl-vertx` test jar is built as a "fat" jar and includes the dependencies it needs (including the
411
411
> Vert.x libraries) so we don't need to separately list the Vert.x jars as well.
412
412
413
413
To register these additional functions with the Jactl runtime we need to have created classes that have
@@ -416,8 +416,8 @@ We then need to tell the runtime the name of these classes so that these static
416
416
will in turn register the functions.
417
417
418
418
For the `jactl-vertx` library, there are two classes that handle the registration of these functions/methods:
419
-
*`jactl.vertx.JsonFunctions`
420
-
*`jactl.vertx.example.VertxFunctions`
419
+
*`jactl.vertx.VertxFunctions`
420
+
*`jactl.vertx.example.ExampleFunctions`
421
421
422
422
We therefore need to list these classes in the `functionClasses` list of our `.jactlrc` file.
423
423
@@ -427,8 +427,8 @@ the Jactl REPL and the Jactl commandline script execution to use Vert.x and thes
0 commit comments