Creating middleware - Sunbird-RC/open-saber GitHub Wiki
-
Clone the git repository for open-saber
-
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>
- 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>
-
Create a java class implementing the Middleware interface.
-
Implement the execute() method to include the logic/functionality for the middleware.
-
Currently the next() method is not being used in the middleware, so an empty implementation can be added for now.
-
Modify the pom.xml file in registry-middleware to include this newly created middleware artifact as a module
-
Modify the pom.xml in middleware to specify the version and the dependency for this newly created artifact