@@ -0,0 +1,1486 @@
+package ac.at.tuwien.infosys.visp.runtime.restAPI;%0A%0Aimport ac.at.tuwien.infosys.visp.runtime.topology.TopologyManagement;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.ResponseBody;%0Aimport org.springframework.web.bind.annotation.RestController;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0A/**%0A * This class is the interface to the Pathfinder Fault Tolerance Framework%0A */%0A%0A@RequestMapping(%22/pathfinder%22)%0A@RestController%0Apublic class PathfinderAPI %7B%0A%0A    @Autowired%0A    TopologyManagement topologyManagement;%0A%0A    private static final Logger LOG = LoggerFactory.getLogger(PathfinderAPI.class);%0A%0A    @RequestMapping(%22/getAllStatistics%22)%0A    @ResponseBody%0A    public Map%3CString, Object%3E getAllStatistics(HttpServletRequest request) %7B%0A        Map%3CString, Object%3E jsonData = new HashMap%3C%3E();%0A%0A        for(String operator: topologyManagement.getOperatorsAsList()) %7B%0A            HashMap%3CString, Object%3E hm = new HashMap%3C%3E();%0A%0A            hm.put(%22cpu_now%22, 0.8);%0A            hm.put(%22ram_now%22, 0.6);%0A            hm.put(%22network_out%22, 110);%0A%0A            jsonData.put(operator, hm);%0A        %7D%0A%0A        LOG.debug(%22/getAllStatistics request from IP %22 + request.getRemoteAddr());%0A        return jsonData;%0A    %7D%0A%7D%0A

create REST API to be used by Pathfinder