@@ -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 handlerattribute and handlerfield, 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