Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.perfmon; |
| 2 | |
| 3 | import org.restlet.Context; |
| 4 | import org.restlet.Restlet; |
| 5 | import org.restlet.routing.Router; |
| 6 | |
| 7 | import net.floodlightcontroller.restserver.RestletRoutable; |
| 8 | |
| 9 | public class PerfWebRoutable implements RestletRoutable { |
| 10 | |
| 11 | @Override |
| 12 | public Restlet getRestlet(Context context) { |
| 13 | Router router = new Router(context); |
| 14 | router.attach("/data/json", PerfMonDataResource.class); |
| 15 | router.attach("/{perfmonstate}/json", PerfMonToggleResource.class); // enable, disable, or reset |
| 16 | return router; |
| 17 | } |
| 18 | |
| 19 | @Override |
| 20 | public String basePath() { |
| 21 | return "/wm/performance"; |
| 22 | } |
| 23 | } |