Skip to content

Creating middleware

jyotsna-tarento edited this page Jul 25, 2018 · 4 revisions

STEPS TO CREATE MIDDLEWARE

  1. Clone the git repository for open-saber

  2. Create a new maven project inside java/middleware/registry-middleware folder, with registry-middleware artifact as the parent for this project

<parent>
    <groupId>io.opensaber</groupId>
    <artifactId>registry-middleware</artifactId>
    <version>0.0.1-SNAPSHOT</version>
</parent>
  1. Include middleware-commons as a dependency in the pom.xml file of this project
<dependency>
    <groupId>io.opensaber</groupId>
    <artifactId>middleware-commons</artifactId>
    <version>0.0.1-SNAPSHOT</version>
</dependency>
  1. Create a java class implementing the Middleware interface.

  2. Implement the execute() method to include the logic/functionality for the middleware.

  3. Currently the next() method is not being used in the middleware, so an empty implementation can be added for now.

  4. Modify the pom.xml file in registry-middleware to include this newly created middleware artifact as a module

  5. Modify the pom.xml in middleware to specify the version and the dependency for this newly created artifact