blob: 92d84abba704b6ee07cfd8aa909f0a30906b75ac [file] [log] [blame]
HIGUCHI Yuta60a10142013-06-14 15:50:10 -07001package net.onrc.onos.ofcontroller.flowmanager.web;
Pavlin Radoslavovf5d80412013-05-24 05:14:07 +00002
HIGUCHI Yuta60a10142013-06-14 15:50:10 -07003import net.onrc.onos.ofcontroller.flowmanager.IFlowService;
Pavlin Radoslavovf5d80412013-05-24 05:14:07 +00004
Pavlin Radoslavovf5d80412013-05-24 05:14:07 +00005import org.restlet.resource.Get;
6import org.restlet.resource.ServerResource;
7import org.slf4j.Logger;
8import org.slf4j.LoggerFactory;
9
10public class MeasurementGetPerFlowInstallTimeFlowResource extends ServerResource {
11 protected static Logger log = LoggerFactory.getLogger(MeasurementGetPerFlowInstallTimeFlowResource.class);
12
13 @Get("json")
14 public String retrieve() {
15 String result = null;
16
17 IFlowService flowService =
18 (IFlowService)getContext().getAttributes().
19 get(IFlowService.class.getCanonicalName());
20
21 if (flowService == null) {
22 log.debug("ONOS Flow Service not found");
23 return result;
24 }
25
26 // Extract the arguments
27
28 // Process the request
29 result = flowService.measurementGetPerFlowInstallTime();
30
31 log.debug("Measurement Get Install Paths Time (nsec): " + result);
32
33 return result;
34 }
35}