public class TimedHandler extends Object implements Route.Handler
Timed annotation on routes.
MVC example:
App.java:
{
use("*", new TimedHandler());
}
PeopleManager.java:
@Path("/api/people")
class PeopleManager {
@Timed("people.all")
public List<Person> list() {
...
}
}
Script example:
{
use("*", new TimedHandler());
get("/api/people", req -> {
...
}).attr("Timed", "people.all");
}
| Constructor and Description |
|---|
TimedHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
handle(Request req,
Response rsp) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlepublic void handle(Request req, Response rsp)
handle in interface Route.HandlerCopyright © 2018. All rights reserved.