Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.staticflowentry.web; |
| 2 | |
| 3 | import net.floodlightcontroller.restserver.RestletRoutable; |
| 4 | |
| 5 | import org.restlet.Context; |
| 6 | import org.restlet.Restlet; |
| 7 | import org.restlet.routing.Router; |
| 8 | |
| 9 | public class StaticFlowEntryWebRoutable implements RestletRoutable { |
| 10 | /** |
| 11 | * Create the Restlet router and bind to the proper resources. |
| 12 | */ |
| 13 | @Override |
| 14 | public Restlet getRestlet(Context context) { |
| 15 | Router router = new Router(context); |
| 16 | router.attach("/json", StaticFlowEntryPusherResource.class); |
| 17 | router.attach("/clear/{switch}/json", ClearStaticFlowEntriesResource.class); |
| 18 | router.attach("/list/{switch}/json", ListStaticFlowEntriesResource.class); |
| 19 | return router; |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * Set the base path for the Topology |
| 24 | */ |
| 25 | @Override |
| 26 | public String basePath() { |
| 27 | return "/wm/staticflowentrypusher"; |
| 28 | } |
| 29 | } |