|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ning.http.client.providers.apache.ApacheResponseFuture<V>
public class ApacheResponseFuture<V>
Constructor Summary | |
---|---|
ApacheResponseFuture(AsyncHandler<V> asyncHandler,
int responseTimeoutInMs,
Request request,
org.apache.commons.httpclient.HttpMethodBase method)
|
Method Summary | |
---|---|
void |
abort(Throwable t)
Abort the current processing, and propagate the Throwable to the AsyncHandler or Future |
boolean |
cancel(boolean mayInterruptIfRunning)
|
void |
content(V v)
TODO. |
void |
done(Callable callable)
Execute a Callable and if there is no exception, mark this Future as done and release the internal lock. |
V |
get()
|
V |
get(long timeout,
TimeUnit unit)
|
Request |
getRequest()
|
boolean |
hasExpired()
Is the Future still valid |
boolean |
isCancelled()
|
boolean |
isDone()
|
protected void |
setInnerFuture(Future<V> innerFuture)
|
protected void |
setReaperFuture(Future<?> reaperFuture)
|
String |
toString()
|
void |
touch()
Touch the current instance to prevent external service to times out. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ApacheResponseFuture(AsyncHandler<V> asyncHandler, int responseTimeoutInMs, Request request, org.apache.commons.httpclient.HttpMethodBase method)
Method Detail |
---|
protected void setInnerFuture(Future<V> innerFuture)
public void done(Callable callable)
FutureImpl
Callable
and if there is no exception, mark this Future as done and release the internal lock.
done
in interface FutureImpl<V>
public void content(V v)
content
in interface FutureImpl<V>
v
- The new contentprotected void setReaperFuture(Future<?> reaperFuture)
public String toString()
toString
in class Object
public void abort(Throwable t)
FutureImpl
Throwable
to the AsyncHandler
or Future
abort
in interface FutureImpl<V>
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface Future<V>
public boolean isCancelled()
isCancelled
in interface Future<V>
public boolean isDone()
isDone
in interface Future<V>
public V get() throws InterruptedException, ExecutionException
get
in interface Future<V>
InterruptedException
ExecutionException
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<V>
InterruptedException
ExecutionException
TimeoutException
public boolean hasExpired()
true
if response has expired and should be terminated.public void touch()
FutureImpl
touch
in interface FutureImpl<V>
public Request getRequest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |