Annotation Interface RequestConverter


Specifies a RequestConverterFunction class which converts an AggregatedHttpRequest to an object.

It can be specified on a class, a method and a parameter in an annotated service. Its scope is determined by where it is specified, e.g.


 > @RequestConverter(AliceConverter.class)
 > @RequestConverter(BobConverter.class)
 > public class MyService {
 >
 >     @Get("/general")
 >     @RequestConverter(CarolConverter.class)
 >     public HttpResponse general(Alice a, Bob b, Carol c) {
 >         // Try CarolConverter, AliceConverter and BobConverter in order, for converting each parameter.
 >     }
 >
 >     @Get("/special")
 >     public HttpResponse special(@RequestConverter(SuperAliceConverter.class) Alice a, Bob b) {
 >         // Try SuperAliceConverter, AliceConverter and BobConverter in order, for converting parameter 'a'.
 >         // Try AliceConverter and BobConverter in order, for converting parameter 'b'.
 >     }
 > }
 
See Also:
RequestConverterFunction, RequestObject