1. Domino REST
  2. Rest clients
  3. Interface inheritance

Interface inheritance

A request factory interface can extend from other interfaces that does or does not have the request factory annotation. this means that we can generate a single request factory for multiple jax-rs interfaces, or we can generate a request factory for jax-rs interfaces when we dont have access to the source code to add the @RequestFactory annotation. each inherited interface can have its own @Path annotation. Example :

			@RequestFactory
public interface SomeService extends FirstService, SecondService {

    @Path("some-path")
    SomeResponse someRequest();
}
		
			@Path("first-root-path")
public interface FirstService {
    @Path("first-path")
    SomeResponse firstRequest();
}
		
			@Path("second-root-path")
public interface SecondService {
    @Path("second-path")
    SomeResponse secondRequest();
}
		

This will generate a factory for all service methods from all three services, where FirstService and SecondService could be coming from an external dependency.

We are a group of passionate people who love what we do

Donate & Support Us