Search in sources :

Example 1 with ConnectionReleaseTrigger

use of org.apache.http.conn.ConnectionReleaseTrigger in project robovm by robovm.

the class HttpRequestBase method abort.

public void abort() {
    ClientConnectionRequest localRequest;
    ConnectionReleaseTrigger localTrigger;
    this.abortLock.lock();
    try {
        if (this.aborted) {
            return;
        }
        this.aborted = true;
        localRequest = connRequest;
        localTrigger = releaseTrigger;
    } finally {
        this.abortLock.unlock();
    }
    // setReleaseTrigger or setConnectionRequest.
    if (localRequest != null) {
        localRequest.abortRequest();
    }
    if (localTrigger != null) {
        try {
            localTrigger.abortConnection();
        } catch (IOException ex) {
        // ignore
        }
    }
}
Also used : ClientConnectionRequest(org.apache.http.conn.ClientConnectionRequest) IOException(java.io.IOException) ConnectionReleaseTrigger(org.apache.http.conn.ConnectionReleaseTrigger)

Example 2 with ConnectionReleaseTrigger

use of org.apache.http.conn.ConnectionReleaseTrigger in project XobotOS by xamarin.

the class HttpRequestBase method abort.

public void abort() {
    ClientConnectionRequest localRequest;
    ConnectionReleaseTrigger localTrigger;
    this.abortLock.lock();
    try {
        if (this.aborted) {
            return;
        }
        this.aborted = true;
        localRequest = connRequest;
        localTrigger = releaseTrigger;
    } finally {
        this.abortLock.unlock();
    }
    // setReleaseTrigger or setConnectionRequest.
    if (localRequest != null) {
        localRequest.abortRequest();
    }
    if (localTrigger != null) {
        try {
            localTrigger.abortConnection();
        } catch (IOException ex) {
        // ignore
        }
    }
}
Also used : ClientConnectionRequest(org.apache.http.conn.ClientConnectionRequest) IOException(java.io.IOException) ConnectionReleaseTrigger(org.apache.http.conn.ConnectionReleaseTrigger)

Example 3 with ConnectionReleaseTrigger

use of org.apache.http.conn.ConnectionReleaseTrigger in project platform_external_apache-http by android.

the class HttpRequestBase method abort.

public void abort() {
    ClientConnectionRequest localRequest;
    ConnectionReleaseTrigger localTrigger;
    this.abortLock.lock();
    try {
        if (this.aborted) {
            return;
        }
        this.aborted = true;
        localRequest = connRequest;
        localTrigger = releaseTrigger;
    } finally {
        this.abortLock.unlock();
    }
    // setReleaseTrigger or setConnectionRequest.
    if (localRequest != null) {
        localRequest.abortRequest();
    }
    if (localTrigger != null) {
        try {
            localTrigger.abortConnection();
        } catch (IOException ex) {
        // ignore
        }
    }
}
Also used : ClientConnectionRequest(org.apache.http.conn.ClientConnectionRequest) IOException(java.io.IOException) ConnectionReleaseTrigger(org.apache.http.conn.ConnectionReleaseTrigger)

Aggregations

IOException (java.io.IOException)3 ClientConnectionRequest (org.apache.http.conn.ClientConnectionRequest)3 ConnectionReleaseTrigger (org.apache.http.conn.ConnectionReleaseTrigger)3