Code example for ExecutorService

Methods: shutdownNow

0
    } 
 
    @Override 
    public void onDestroy() { 
        super.onDestroy(); 
        mExecutor.shutdownNow();
    } 
 
    public HttpResponse request(HttpUriRequest req) throws IOException {
        String rk = mPref.getString(Setting.ACCOUNT_RK, null);
 
        if (rk != null) {
            BasicClientCookie cookie = new BasicClientCookie("rk", rk);
            cookie.setDomain(".hatena.ne.jp");
            sHttpClient.getCookieStore().addCookie(cookie);
        } 
 
        return sHttpClient.execute(req);
    } 
}