@Override
    public void run() {

        RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(10 * 1000).build();
        HttpClient client = HttpClientBuilder.create().setDefaultRequestConfig(requestConfig).build();
        //HttpClient client = new DefaultHttpClient();

        HttpGet request = new HttpGet(
                "https://api.guildwars2.com/v1/wvw/matches.json");
        
        HttpResponse response;

        String line = "";
        String out = "";

        while (!this.isInterrupted()) {
            
            try {
                
                response = client.execute(request);
                
                if ((response.getStatusLine().toString().contains("200"))) {

                    BufferedReader rd = new BufferedReader(new InputStreamReader(
                        response.getEntity().getContent(), Charset.forName("UTF-8")));

                    line = "";
                    out = "";

                    while ((line = rd.readLine()) != null) {

                        out = out + line;
                    }

                    JSONParser parser = new JSONParser();

                    Object obj;

                    this.result.clear();

                    try {

                        obj = parser.parse(out);
                        
                        JSONObject obj2 = (JSONObject) obj;
                        JSONArray array = (JSONArray) obj2.get("wvw_matches");

                        for (int i = 0; i < array.size(); i++) {

                             obj2 = (JSONObject) array.get(i);

                            this.result.put("" + obj2.get("wvw_match_id"),
                                    new String[]{"" + obj2.get("red_world_id"),
                                        "" + obj2.get("blue_world_id"),
                                        "" + obj2.get("green_world_id")});
                        }
                        
                        request.releaseConnection();
                    
                        this.wvwCheckBox.setEnabled(true);
                        this.interrupt();
                    } catch (ParseException ex) {
                        try {
                            Logger.getLogger(ApiManager.class.getName()).log(
                                    Level.SEVERE, null, ex);
                            
                            request.releaseConnection();
                            Thread.sleep(3000);
                        } catch (InterruptedException ex1) {
                            Logger.getLogger(WvWMatchReader.class.getName()).log(Level.SEVERE, null, ex1);
                        }
                    }
                } else {
                    try {
                        Logger.getLogger(EventReader.class.getName()).log(
                            Level.SEVERE, null, "Connection error.");
                        
                        request.releaseConnection();
                        Thread.sleep(3000);
                    } catch (InterruptedException ex) {
                        Logger.getLogger(HomeWorldAllReader.class.getName()).log(Level.SEVERE, null, ex);
                        
                        this.interrupt();
                    }
                }
            } catch (IOException | IllegalStateException ex) {
                try {
                    Logger.getLogger(EventReader.class.getName()).log(
                            Level.SEVERE, null, ex);
                    
                    request.releaseConnection();
                    Thread.sleep(3000);
                } catch (InterruptedException ex1) {
                    Logger.getLogger(HomeWorldAllReader.class.getName()).log(Level.SEVERE, null, ex1);
                    
                    this.interrupt();
                }
            }
        }
    }