Application Mode configuration

Application Mode starts applications when the Deephaven server starts. Each application loaded from a file has one *.app file that defines it. Some applications are discovered another way, such as through a ServiceLoader factory, and need no .app file.

The deephaven.application.dir property sets the application directory. When that property is unset, the server uses the app.d directory inside the Deephaven configuration directory, if it exists.

Each *.app file can have any name that ends in .app. The file must be a regular file. It must not be a symbolic link, and it must be in the application directory.

The server loads .app files in lexicographic order by file name. It skips any file that is not a readable .app regular file, without reporting an error. A readable .app file with an invalid definition, such as one with no type, stops the server from starting.

The following file defines a script application that runs helloWorld.groovy on a Groovy server. The Common properties and Script applications sections describe each property.

Common properties

ParameterTypeDescription
typeString

Required. The kind of application. Valid values:

  • script runs the scripts listed in file_<n>.
  • static creates the application from the class named in class. See Class-based applications.
  • dynamic creates the application from the class named in class. See Class-based applications.
  • qst is reserved and not implemented, so an application of this type never runs.
enabledBoolean

Optional. Whether the server loads this application.

  • true (default) loads the application. The value is not case-sensitive.
  • Any other value, such as false or yes, skips the application. The server still reads and validates a skipped application's definition, so a disabled file with an invalid definition still stops the server from starting.

Script applications

These properties apply when type is script.

ParameterTypeDescription
scriptTypeString

Required. The language of the script, python or groovy. For an enabled application, it must match the language of the server (set with -Ddeephaven.console.type), or the server fails to start. The value is not case-sensitive.

idString

Required. A unique identifier for the application. API clients use it to look up the application's fields.

A field is a named value that the application publishes for clients to fetch by name.

No two enabled applications on a server can share an id. The id scope is reserved, so an application with that id cannot publish fields.

nameString

Required. The application's display name.

file_<n>String

Required. The path to one script to run, where <n> is a string of ASCII digits, such as file_0 and file_1. Keys whose suffix contains other characters, such as file_+1 or file_a, are ignored. A number above 2147483647 stops the server from starting. Specify at least one. Relative paths resolve against the application directory.

Scripts run in ascending order of <n>, not in the order they appear in the file. The server ignores keys whose suffix is not an integer, such as file_a.

Class-based applications

This property applies when type is static or dynamic.

ParameterTypeDescription
classString

Required. The fully qualified name of a class that has a no-argument constructor. The class implements one of these interfaces: