-
-
Notifications
You must be signed in to change notification settings - Fork 5
Interface inheritance
Ahmad K. Bawaneh edited this page Dec 28, 2019
·
2 revisions
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 it own @Path
annotation.
Sample :
@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();
}
So this will generate a factory for all service methods from all three services, where FirstService
and SecondService
could be coming from an external dependency.
- Home
- Quick start
- Sharing clients
-
Configuration
- Locating resource classes
- Service root
- Resource root
- Http methods
- Service method path mapping
- Service path
- Query parameters
- Path parameters
- Header parameters
- Date format
- Request body
- Request and Response mapping
- Produces and Consumes
- Success codes
- Timeout and maximum retries
- With credentials
- Custom request URL
- Global interceptors
- Default failed response handler
- Interface inheritance
- Multipart form data