• Odysseus script is our integration language
  • Commands to define the next parser to be used (#PARSER)
  • Commands to define a new query (#ADDQUERY)
  • Commands to start and stop queries
  • Some commands to control execution: #LOOP, #FOREACH, etc.
  • Quite easy to integrate new commands

Example: Create a Sleep Command

  • The current translation thread should do some work (e.g. start a query)
  • After that the translation thread should wait some time (e.g. to allow query initialization)
  • In Odysseus: #SLEEP <timeInMs>
  • For this, we need to
    • Create an Odysseus Script Command (aka PreParserKeyword)
    • Create an ExecutorCommand


Preparser Keyword

Executor Command

Example: Startquery command

Register commands inside Odysseus

Odysseus script commands: implement IPreParserKeywordProvider and returns Map<String, Class (<? extends IPreParserKeyword>

This is quite typical in Odysseus to avoid the definition of a service for every single handler (here OdysseusScript keywords)

OSGi Service

  • No labels