blob: 46d3cabe9e294ad4f2d8bac4ef413d9827b4d6ca [file] [log] [blame]
Jonathan Hart6df90172014-04-03 10:13:11 -07001package net.onrc.onos.core.datagrid.web;
Pavlin Radoslavovda7ef612013-10-30 16:12:14 -07002
3import net.floodlightcontroller.restserver.RestletRoutable;
4
5import org.restlet.Context;
6import org.restlet.Restlet;
7import org.restlet.routing.Router;
8
9/**
10 * REST API implementation for the Datagrid.
11 */
12public class DatagridWebRoutable implements RestletRoutable {
13 /**
14 * Create the Restlet router and bind to the proper resources.
15 */
16 @Override
17 public Restlet getRestlet(Context context) {
18 Router router = new Router(context);
Jonathan Hart10a7e2b2014-02-21 18:30:08 -080019 router.attach("/get/ng-events/json", GetNGEventsResource.class);
Pavlin Radoslavovda7ef612013-10-30 16:12:14 -070020 return router;
21 }
22
23 /**
Ray Milkeyb41100a2014-04-10 10:42:15 -070024 * Set the base path for the Topology.
Pavlin Radoslavovda7ef612013-10-30 16:12:14 -070025 */
26 @Override
27 public String basePath() {
Naoki Shiota862cc3b2013-12-13 15:42:50 -080028 return "/wm/onos/datagrid";
Pavlin Radoslavovda7ef612013-10-30 16:12:14 -070029 }
30}