MCPcopy Index your code
hub / github.com/HTTP-RPC/Kilo / MathServlet

Class MathServlet

kilo-test/src/main/java/org/httprpc/kilo/test/MathServlet.java:25–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23import static org.httprpc.kilo.util.Collections.*;
24
25@WebServlet("/math/example")
26public class MathServlet extends PageServlet {
27 private interface Parameters {
28 double getA();
29 double getB();
30
31 List<Double> getValues();
32 }
33
34 private @WebService.Instance MathService mathService = null;
35
36 @Override
37 protected Object execute() {
38 var parameters = getParameters(Parameters.class);
39
40 var a = parameters.getA();
41 var b = parameters.getB();
42
43 var values = parameters.getValues();
44
45 var sum = mathService.getSum(a, b) + mathService.getSum(values);
46
47 return mapOf(
48 entry("sum", sum)
49 );
50 }
51}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected