daml/ledger-service
Leonid Shlyapnikov 29e1931f17
Add --port-file command line option to JSON API (#5454)
* Adding `--port-file` support

* ``--port-file`` support

* Updating docs

changelog_begin

[JSON API] Add support for ``--port-file`` command line option.
``--http-port 0 --port-file ./json-api.port`` will pick up a free port
and write it into ``./json-api.port` file.

changelog_end

* reformatting

* Usage grammar

* use bimap

* Adding `PortFiles` utility for creating and deleting port files on JVM exit

* Adding scaladoc explaining that the port file should be deleted on

JVM termination.

* Updating usage and docs to reflect that the file must be unique and

will be deleted on graceful shutdown

* Relying on `java.nio.file.FileAlreadyExistsException` to determine the

case when failed due to the nonunique file name.

* toString instead of Exception.getMessage

java.nio exception's getMessage can be just a file name, need the class
name to capture the error context.

* updatePortFile -> createPortFile

* write to file instead of write into file
2020-04-08 18:48:11 +00:00
..
db-backend Use com.daml as root package (#5343) 2020-04-05 19:49:57 +02:00
http-json Add --port-file command line option to JSON API (#5454) 2020-04-08 18:48:11 +00:00
jwt Use com.daml as root package (#5343) 2020-04-05 19:49:57 +02:00
lf-value-json Use com.daml as root package (#5343) 2020-04-05 19:49:57 +02:00
utils Use com.daml as root package (#5343) 2020-04-05 19:49:57 +02:00