Pankaj Berde | 5024ec1 | 2013-01-31 17:07:29 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.linkdiscovery.web; |
| 2 | |
| 3 | import java.util.List; |
| 4 | import net.floodlightcontroller.linkdiscovery.internal.TopoLinkServiceImpl; |
| 5 | import net.floodlightcontroller.routing.Link; |
| 6 | |
| 7 | import org.restlet.resource.Get; |
| 8 | import org.restlet.resource.ServerResource; |
| 9 | |
| 10 | public class TopoLinksResource extends ServerResource { |
| 11 | |
| 12 | @Get("json") |
| 13 | public List<Link> retrieve() { |
| 14 | TopoLinkServiceImpl impl = new TopoLinkServiceImpl(); |
| 15 | |
Pankaj Berde | 1cde50b | 2013-02-19 20:16:06 -0800 | [diff] [blame] | 16 | List<Link> retval = impl.getActiveLinks(); |
Pankaj Berde | d18c762 | 2013-02-04 10:28:35 -0800 | [diff] [blame] | 17 | return retval; |
Pankaj Berde | 5024ec1 | 2013-01-31 17:07:29 -0800 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | } |