Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.learningswitch; |
| 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 LearningSwitchWebRoutable implements RestletRoutable { |
| 10 | |
| 11 | @Override |
| 12 | public Restlet getRestlet(Context context) { |
| 13 | Router router = new Router(context); |
| 14 | router.attach("/table/{switch}/json", LearningSwitchTable.class); |
| 15 | return router; |
| 16 | } |
| 17 | |
| 18 | @Override |
| 19 | public String basePath() { |
| 20 | return "/wm/learningswitch"; |
| 21 | } |
| 22 | } |