-
-
Notifications
You must be signed in to change notification settings - Fork 5
Context and Suspended
Ahmad K. Bawaneh edited this page Feb 16, 2020
·
1 revision
Domino-rest is supposed to generate clients for JAX-RS resource interfaces, and is not responsible about how these interfaces are implemented in the server, knowing that we now that @Context
is supposed to be injected into the implementation by the server side, as for domino-rest such method argument will be ignored and skipped.
for example if the have the following resource interface
@RequestFactory
public interface MoviesService {
@Path("library/movies")
@GET
Movie getMovieByName(@QueryParam("name") String movieName, @Context ServerContext context);
}
then the generated client will be like this
MoviesServiceFactory.INSTANCE
.getMovieByName("hulk")
.onSuccess(movie ->{})
.send();
notice how the context param is ignored.
For @Suspended
domino-rest will also ignore the method argument, but since this one is used with void
response, and this hides the actual response type we there should be a reader defined for such method.
- 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