@GET
  @Produces({"text/html"})
  public Response getUsage(@Context HttpHeaders headers, @Context UriInfo ui) throws IOException{

    String entity = "<h2>Usage of calculator</h2><br>" +
        "<ul>" +
        "<li><b>calculator/add/{a}/{b}</b> - add {a} to {b}</li>" +
        "<li><b>calculator/subtract/{a}/{b}</b> - subtract {a} from {b}</li>" +
        "<li><b>calculator/multiply/{a}/{b}</b> - multiply {a} with {b}</li>" +
        "<li><b>calculator/divide/{a}/{b}</b> - divide {a} by {b}</li>" +
        "</ul>"
        ;
    return Response.ok(entity).type("text/html").build();
  }
Handles: GET /calculator Get the calculator usage.

@param headers   http headers
@param ui        uri info

@return the response including the usage of the calculator resource
ambari-views/examples/calculator-view/src/main/java/org/apache/ambari/view/proxy/CalculatorResource.java