Interface ParameterSupplier
public interface ParameterSupplier
-
Method Summary
-
Method Details
-
provide
Object provide(Method method, Parameter parameter, Matcher matcher, org.microhttp.Request request) throws Exception Supplies a value for aParameterin aMethod.If it is impossible to supply a value for the given parameter, a
Exceptionshould be thrown.If that
Exceptionis an instance ofIntoResponsethen that can be used to give a specific error to the user.- Parameters:
method- The method being called.parameter- The parameter on that method.matcher- The regex matcher for the url. Can be used to pull out route params.request- The request being handled.- Returns:
- A value for the parameter.
- Throws:
Exception- If a value cannot be supplied.
-