private static void launchServer() throws IOException {

        InetSocketAddress addr = new InetSocketAddress(Integer.valueOf(conf.getProperty(PORT)));
        HttpServer server = HttpServer.create(addr, 0);


        server.createContext("/", new HttpHandler() {


            public void handle(HttpExchange exchange) throws IOException {
                String requestMethod = exchange.getRequestMethod();
                if (requestMethod.equalsIgnoreCase(AppMonitoredConstant.GET)) {
                    Headers responseHeaders = exchange.getResponseHeaders();
                    responseHeaders.set("Content-Type", "text/html");
                    exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);

                    OutputStream responseBody = exchange.getResponseBody();
                    responseBody.write(Helper.loadFile(pathWebFile));
                    responseBody.close();
                }
            }
        });


        server.createContext("/" + ALL_ITEMS, new HttpHandler() {
            public void handle(HttpExchange httpExchange) throws IOException {

                Headers responseHeaders = httpExchange.getResponseHeaders();
                responseHeaders.set("Content-Type", "text/json");
                httpExchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);


                Collection<String> tranformed = Collections2.transform(appMonitoreds.values(), new Function<AppMonitored, String>() {
                    public String apply(AppMonitored appMonitored) {
                        return appMonitored.getJSon();
                    }
                });

                final OutputStream o = httpExchange.getResponseBody();
                o.write(("[" + Joiner.on(',').join(tranformed) + "]").getBytes());
                o.close();


            }


        });

        HttpContext ctx = server.createContext("/" + CHECK, new HttpHandler() {
            public void handle(HttpExchange httpExchange) throws IOException {

                Headers responseHeaders = httpExchange.getResponseHeaders();

                final String appKey = ((Map<String, String>) httpExchange.getAttribute(AppMonitoredConstant.PARAMS_KEY)).get(AppMonitoredConstant.URL_KEY);
                AppMonitored current = appMonitoreds.get(appKey);


                responseHeaders.set("Content-Type", "text/html");
                String result = "OK";
                try {
                    result = Helper.httpQuery(current.getUrl()) ? "OK" : "KO";
                } catch (Exception e) {
                    e.printStackTrace();
                }

                httpExchange.sendResponseHeaders(HTTP_OK, 0);
                final OutputStream o = httpExchange.getResponseBody();

                o.write((result + "-" + current.getKey()).getBytes());
                o.close();
            }
        });

        ctx.getFilters().add(new Filter() {
            @Override
            public void doFilter(HttpExchange httpExchange, Chain chain) throws IOException {

                final Map<String, String> params = Maps.newHashMap();
                final URI currentUri = httpExchange.getRequestURI();
                final String query = currentUri.getQuery();


                Iterable<String> keyValues = Splitter.on('&').split(query);

                for (String kv : keyValues) {
                    final Iterable<String> skv = Splitter.on('=').split(kv);
                    params.put(FluentIterable.from(skv).first().get(), FluentIterable.from(skv).last().get());
                }

                httpExchange.setAttribute(AppMonitoredConstant.PARAMS_KEY, params);
                chain.doFilter(httpExchange);

            }

            @Override
            public String description() {
                return "catch parameters";
            }
        });


        server.setExecutor(Executors.newCachedThreadPool());
        server.start();

        System.out.println("Server is listening on port 8080");
    }