blob: 2761e717e843ecfd13476d97dca93db9e2c7449e [file] [log] [blame]
Ray Milkey26921af2014-06-30 16:27:40 -07001package net.onrc.onos.core.metrics;
2
3import net.floodlightcontroller.restserver.RestletRoutable;
4import org.restlet.Context;
5import org.restlet.Restlet;
6import org.restlet.routing.Router;
7
8/**
9 * Restlet Router for Metrics REST APIs.
10 */
11public class MetricsWebRoutable implements RestletRoutable {
12 /**
13 * Creates the Restlet router and binds to the proper resources.
14 */
15 @Override
16 public Restlet getRestlet(Context context) {
17 Router router = new Router(context);
18 // GET all metrics
19 router.attach("", MetricsResource.class);
20 return router;
21 }
22
23
24 /**
25 * Sets the base path for the Metrics.
26 */
27 @Override
28 public String basePath() {
29 return "/wm/onos/metrics";
30 }
31}