org.apache.http.client.methods
Class AbstractExecutionAwareRequest

java.lang.Object
  extended by org.apache.http.message.AbstractHttpMessage
      extended by org.apache.http.client.methods.AbstractExecutionAwareRequest
All Implemented Interfaces:
Cloneable, AbortableHttpRequest, HttpExecutionAware, org.apache.http.HttpMessage, org.apache.http.HttpRequest
Direct Known Subclasses:
HttpRequestBase

public abstract class AbstractExecutionAwareRequest
extends org.apache.http.message.AbstractHttpMessage
implements HttpExecutionAware, AbortableHttpRequest, Cloneable, org.apache.http.HttpRequest


Field Summary
 
Fields inherited from class org.apache.http.message.AbstractHttpMessage
headergroup, params
 
Constructor Summary
protected AbstractExecutionAwareRequest()
           
 
Method Summary
 void abort()
          Aborts this http request.
 Object clone()
           
 void completed()
           
 boolean isAborted()
           
 void reset()
          Resets internal state of the request making it reusable.
 void setCancellable(org.apache.http.concurrent.Cancellable cancellable)
          Sets Cancellable for the ongoing operation.
 void setConnectionRequest(ClientConnectionRequest connRequest)
          Deprecated. Use setCancellable(Cancellable)
 void setReleaseTrigger(ConnectionReleaseTrigger releaseTrigger)
          Deprecated. Use setCancellable(Cancellable)
 
Methods inherited from class org.apache.http.message.AbstractHttpMessage
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.http.HttpRequest
getRequestLine
 
Methods inherited from interface org.apache.http.HttpMessage
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, getProtocolVersion, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
 

Constructor Detail

AbstractExecutionAwareRequest

protected AbstractExecutionAwareRequest()
Method Detail

setConnectionRequest

@Deprecated
public void setConnectionRequest(ClientConnectionRequest connRequest)
Deprecated. Use setCancellable(Cancellable)

Description copied from interface: AbortableHttpRequest
Sets the ClientConnectionRequest callback that can be used to abort a long-lived request for a connection. If the request is already aborted, throws an IOException.

Specified by:
setConnectionRequest in interface AbortableHttpRequest
See Also:
ClientConnectionManager

setReleaseTrigger

@Deprecated
public void setReleaseTrigger(ConnectionReleaseTrigger releaseTrigger)
Deprecated. Use setCancellable(Cancellable)

Description copied from interface: AbortableHttpRequest
Sets the ConnectionReleaseTrigger callback that can be used to abort an active connection. Typically, this will be the ManagedClientConnection itself. If the request is already aborted, throws an IOException.

Specified by:
setReleaseTrigger in interface AbortableHttpRequest

abort

public void abort()
Description copied from interface: AbortableHttpRequest
Aborts this http request. Any active execution of this method should return immediately. If the request has not started, it will abort after the next execution. Aborting this request will cause all subsequent executions with this request to fail.

Specified by:
abort in interface AbortableHttpRequest
See Also:
HttpClient.execute(HttpUriRequest), HttpClient.execute(org.apache.http.HttpHost, org.apache.http.HttpRequest), HttpClient.execute(HttpUriRequest, org.apache.http.protocol.HttpContext), HttpClient.execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext)

isAborted

public boolean isAborted()
Specified by:
isAborted in interface HttpExecutionAware

setCancellable

public void setCancellable(org.apache.http.concurrent.Cancellable cancellable)
Description copied from interface: HttpExecutionAware
Sets Cancellable for the ongoing operation.

Specified by:
setCancellable in interface HttpExecutionAware
Since:
4.2

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

completed

public void completed()
Since:
4.2

reset

public void reset()
Resets internal state of the request making it reusable.

Since:
4.2


Copyright © 1999–2019 The Apache Software Foundation. All rights reserved.