FileDocCategorySizeDatePackage
MockHttpClient.javaAPI DocAndroid 5.1 API3703Thu Mar 12 22:22:56 GMT 2015com.android.volley.mock

MockHttpClient

public class MockHttpClient extends Object implements HttpClient

Fields Summary
private int
mStatusCode
private HttpEntity
mResponseEntity
public HttpUriRequest
requestExecuted
Constructors Summary
Methods Summary
public Texecute(org.apache.http.HttpHost arg0, org.apache.http.HttpRequest arg1, org.apache.http.client.ResponseHandler arg2, org.apache.http.protocol.HttpContext arg3)

        throw new UnsupportedOperationException();
    
public org.apache.http.HttpResponseexecute(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.protocol.HttpContext context)


    // This is the only one we actually use.
    
          
        requestExecuted = request;
        StatusLine statusLine = new BasicStatusLine(
                new ProtocolVersion("HTTP", 1, 1), mStatusCode, "");
        HttpResponse response = new BasicHttpResponse(statusLine);
        response.setEntity(mResponseEntity);

        return response;
    
public org.apache.http.HttpResponseexecute(org.apache.http.client.methods.HttpUriRequest request)

        throw new UnsupportedOperationException();
    
public org.apache.http.HttpResponseexecute(org.apache.http.HttpHost target, org.apache.http.HttpRequest request)

        throw new UnsupportedOperationException();
    
public Texecute(org.apache.http.client.methods.HttpUriRequest arg0, org.apache.http.client.ResponseHandler arg1)

        throw new UnsupportedOperationException();
    
public org.apache.http.HttpResponseexecute(org.apache.http.HttpHost target, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context)

        throw new UnsupportedOperationException();
    
public Texecute(org.apache.http.client.methods.HttpUriRequest arg0, org.apache.http.client.ResponseHandler arg1, org.apache.http.protocol.HttpContext arg2)

        throw new UnsupportedOperationException();
    
public Texecute(org.apache.http.HttpHost arg0, org.apache.http.HttpRequest arg1, org.apache.http.client.ResponseHandler arg2)

        throw new UnsupportedOperationException();
    
public org.apache.http.conn.ClientConnectionManagergetConnectionManager()

        throw new UnsupportedOperationException();
    
public org.apache.http.params.HttpParamsgetParams()

        throw new UnsupportedOperationException();
    
public voidsetErrorCode(int statusCode)

        if (statusCode == HttpStatus.SC_OK) {
            throw new IllegalArgumentException("statusCode cannot be 200 for an error");
        }
        mStatusCode = statusCode;
    
public voidsetResponseData(org.apache.http.HttpEntity entity)


        
        mStatusCode = HttpStatus.SC_OK;
        mResponseEntity = entity;