generic usage for lsp4j remastered from: https://github.com/TypeFox/lsp4j-chat-app
https://www.eclipse.org/community/eclipse_newsletter/2017/may/article2.php
Although LSP4J carries the LSP bit in its name, it is, in fact, a generic and very convenient JSON-RPC implementation for Java, that can be used for all JSON-RPC protocols. The LSP specific part is nicely separated, and you don't need to deal with that when working with your own protocols.