Methods Summary |
---|
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();
}
// Trigger the callbacks outside of the lock, to prevent
// deadlocks in the scenario where the callbacks have
// their own locks that may be used while calling
// setReleaseTrigger or setConnectionRequest.
if (localRequest != null) {
localRequest.abortRequest();
}
if (localTrigger != null) {
try {
localTrigger.abortConnection();
} catch (IOException ex) {
// ignore
}
}
|
public java.lang.Object | clone()
HttpRequestBase clone = (HttpRequestBase) super.clone();
clone.abortLock = new ReentrantLock();
clone.aborted = false;
clone.releaseTrigger = null;
clone.connRequest = null;
clone.headergroup = (HeaderGroup) CloneUtils.clone(this.headergroup);
clone.params = (HttpParams) CloneUtils.clone(this.params);
return clone;
|
public abstract java.lang.String | getMethod()
|
public org.apache.http.ProtocolVersion | getProtocolVersion()
return HttpProtocolParams.getVersion(getParams());
|
public org.apache.http.RequestLine | getRequestLine()
String method = getMethod();
ProtocolVersion ver = getProtocolVersion();
URI uri = getURI();
String uritext = null;
if (uri != null) {
uritext = uri.toASCIIString();
}
if (uritext == null || uritext.length() == 0) {
uritext = "/";
}
return new BasicRequestLine(method, uritext, ver);
|
public java.net.URI | getURI()
return this.uri;
|
public boolean | isAborted()
return this.aborted;
|
public void | setConnectionRequest(org.apache.http.conn.ClientConnectionRequest connRequest)
this.abortLock.lock();
try {
if (this.aborted) {
throw new IOException("Request already aborted");
}
this.releaseTrigger = null;
this.connRequest = connRequest;
} finally {
this.abortLock.unlock();
}
|
public void | setReleaseTrigger(org.apache.http.conn.ConnectionReleaseTrigger releaseTrigger)
this.abortLock.lock();
try {
if (this.aborted) {
throw new IOException("Request already aborted");
}
this.connRequest = null;
this.releaseTrigger = releaseTrigger;
} finally {
this.abortLock.unlock();
}
|
public void | setURI(java.net.URI uri)
this.uri = uri;
|