Interface ResponseCoercer
public interface ResponseCoercer
-
Method Summary
-
Method Details
-
coerce
Coerce the value returned by aMethodinto anIntoResponse.If this is not doable, it is expected that an
Exceptionwill be thrown.If that
Exceptionis an instance ofIntoResponsethen that can be used to give a specific error to the user.- Parameters:
method- The method that was called. Can be inspected for annotations and declared return type.o- The object returned from the method.- Returns:
- An instance of
IntoResponse - Throws:
Exception
-