Skip to content
Snippets Groups Projects
Commit 7496e1b5 authored by René Schöne's avatar René Schöne
Browse files

Update documentation for simplified handler creation.

parent 841cea4e
Branches
No related tags found
No related merge requests found
......@@ -4,15 +4,16 @@ To add a new communication protocol, the following locations have to be changed
Within `ragconnect.base/src/main/resources`:
- Add a new handler `ABCHandler`, if appropriate, similar to the existing handlers
- Add a new template `abc.mustache` containing an aspect `ABC` initializing the handler (if any) similar to the existing protocols
- In `ragconnect.mustache`: add `{{#usesABC}}{{> abc}}{{/usesABC}}` and `{{#usesABC}}{{abcHandlerField}}.close();{{/usesABC}}`, respectively if appropriate
- If further methods are needed for handler initialization, add a new template `abc.mustache` containing those procedures. Add `{{#usesABC}}{{> abc}}{{/usesABC}}` at the top of `ragconnect.mustache` to use this template
- In `receiveDefinition.mustache` and `sendDefinition.mustache`: add a new case in the switch statement defining the logic to happen for both definitions. If the new protocol is close to a PUSH semantic, follow `mqtt`. If it is closer to PULL semantic, follow `rest`.
Within `ragconnect.base/src/main/jastadd`:
- In `backend/Configuration`: add a new static boolean flag `usesABC` to indicate whether the protocol is used
- In `backend/Configuration`:
- Add a new static boolean flag `usesABC` to indicate whether the protocol is used
- In `backend/Generation`:
- Add new attributes for type `MRagConnect` for handler-attribute and handler-field, if needed
- Add new attributes for type `MRagConnect` for handler attribute and handler field, if needed
- Add attributes for newly introduced references in changed mustache templates, if any
- Add a newly constructed handler within the definition of `RagConnect.toMustache` with the needed fields (class name, construction snippet, handler attribute, handler field, the boolean flag you just added to Configuration)
- In `backend/MustacheNodesToYAML`:
- Add key-value-pair for `usesABC` (and handler, if any)
- Add key-value-pairs for newly introduced referemces in changed mustache templates, if any
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment