private static final String WEB_ID = "flows";
private static final short WEB_ORDER = 2;
+ private final Gson gson;
+
public Flows() {
ServiceHelper.registerGlobalService(IDaylightWeb.class, this, null);
+ gson = new Gson();
}
@Override
return null;
}
- Gson gson = new Gson();
FlowConfig flow = gson.fromJson(body, FlowConfig.class);
+
Node node = Node.fromString(nodeId);
flow.setNode(node);
Status result = new Status(StatusCode.BADREQUEST, "Invalid request");
return "Forwarding Rules Manager is not available";
}
- Gson gson = new Gson();
List<Map<String, String>> flowList = new ArrayList<Map<String, String>>();
flowList = gson.fromJson(body, flowList.getClass());
Status result = new Status(StatusCode.BADREQUEST, "Invalid request");