package com.dbs.dbsec.httpTask;

import java.util.HashMap;
import java.util.concurrent.ExecutionException;


public class HttpRunnable implements Runnable {
  
  private static final String TAG = "HttpRunnable";
  private String url = "";
  private HashMap<String, String> mData;
  
  private CallBack callBack;
  
  public HttpRunnable(String url, HashMap<String, String> mData, CallBack callBack) {
    this.url      = url;
    this.mData    = mData;
    this.callBack = callBack;
  }
  
  @Override
  public void run() {
    
    try {
      HttpCon httpCon = new HttpCon(url, mData);
      
      String result = httpCon.execute().get();
      
      callBack.result(result);
    } catch (ExecutionException e) {
    } catch (InterruptedException e) {
    }
    
  }
}
