org.apache.http.nio.protocol
Class AbstractAsyncResponseConsumer<T>
java.lang.Object
org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<T>
- All Implemented Interfaces:
- Closeable, Cancellable, HttpAsyncResponseConsumer<T>
- Direct Known Subclasses:
- BasicAsyncResponseConsumer
@ThreadSafe
public abstract class AbstractAsyncResponseConsumer<T>
- extends Object
- implements HttpAsyncResponseConsumer<T>
- Since:
- 4.2
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAsyncResponseConsumer
public AbstractAsyncResponseConsumer()
onResponseReceived
protected abstract void onResponseReceived(HttpResponse response)
onContentReceived
protected abstract void onContentReceived(ContentDecoder decoder,
IOControl ioctrl)
throws IOException
- Throws:
IOException
buildResult
protected abstract T buildResult(HttpContext context)
throws Exception
- Throws:
Exception
releaseResources
protected abstract void releaseResources()
responseReceived
public void responseReceived(HttpResponse response)
throws IOException,
HttpException
- Specified by:
responseReceived
in interface HttpAsyncResponseConsumer<T>
- Throws:
IOException
HttpException
consumeContent
public void consumeContent(ContentDecoder decoder,
IOControl ioctrl)
throws IOException
- Specified by:
consumeContent
in interface HttpAsyncResponseConsumer<T>
- Throws:
IOException
responseCompleted
public void responseCompleted(HttpContext context)
- Specified by:
responseCompleted
in interface HttpAsyncResponseConsumer<T>
cancel
public boolean cancel()
- Specified by:
cancel
in interface Cancellable
failed
public void failed(Exception ex)
- Specified by:
failed
in interface HttpAsyncResponseConsumer<T>
close
public void close()
- Specified by:
close
in interface Closeable
getException
public Exception getException()
- Specified by:
getException
in interface HttpAsyncResponseConsumer<T>
getResult
public T getResult()
- Specified by:
getResult
in interface HttpAsyncResponseConsumer<T>
isDone
public boolean isDone()
- Specified by:
isDone
in interface HttpAsyncResponseConsumer<T>
Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.