In addition to java API, the GEMOC Studio implements several web protocols.
For consistency, these protocols are defined using the same mechanism as LSP.
However, in order to be deployed internally in web browsers, instead of defining a socket or a port for each protocol, most implementation in the studio use websockets.
For convenience, an extensible websocket server is provided as an eclipse plugin (see Section 20.3.3, “Websocket server”). This allows deploying new endpoints in any eclipse based application or IDE, simply by adding a plugin extension.
Figure 21.1, “Protocols overview” shows an overview of the components that offer or use the protocols in the Eclipse Studio.
GEMOC provides a basic generator in order to consistently create protocol implementations using LSP like approach.
The current generator primarily targets websocket endpoints, but the generated classes are probabl generic enough to be used in other context.
JSONSchema2APIProtocolGenerator allows to generate several interfaces, implementations and documentation artifacts from a JSON schema representing the protocol message specification.
The current version of JSONSchema2APIProtocolGenerator is written in typescript.
Inputs :
It uses a file generator_config.json to drive the generations and output directories.
generator_config.json defines some parameters such as
Currently supported output:
org.eclipse.lsp4j.jsonrpc library.The goal of the Engine Add-On Protocol (EAOP) is to provide services similar to those offered by the java IEngineAddon API (cf. Figure 20.9, “Execution Framework API Interfaces overview”) but via websocket communication.
The figure Figure 21.2, “Engine Add-On Protocol overview” presents the Client and Server JSON RPC methods and the exchanged data.
[83] asciidoc source of this page: https://github.com/eclipse/gemoc-studio/tree/master/docs/org.eclipse.gemoc.studio.doc/src/main/asciidoc/dev/Protocols_headContent.asciidoc.
[84] asciidoc source of this page: https://github.com/eclipse/gemoc-studio-modeldebugging/tree/master/protocols/generators/docs/ProtocolGenerators.asciidoc.