Code example for ThreadSafeClientConnManager

0
        SchemeRegistry schemeRegistry = new SchemeRegistry();
        schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
        schemeRegistry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
 
        // Create the connection manager. 
        HTTP_CONNECTION_MANAGER = new ThreadSafeClientConnManager(params, schemeRegistry);
    } 
 
    public static final class Operation { 
        public String inOutEtag;
        public int outStatus;
        public InputStream outBody;
    } 
 
    public void setAuthToken(String authToken) {
        mAuthToken = authToken;
    } 
 
    public void get(String feedUrl, Operation operation) throws IOException {
        callMethod(new HttpGet(feedUrl), operation);