org.apache.http.nio.client.methods
Class AbstractHttpAsyncResponseConsumer<T>

java.lang.Object
  extended by org.apache.http.nio.client.methods.AbstractHttpAsyncResponseConsumer<T>
All Implemented Interfaces:
HttpAsyncResponseConsumer<T>
Direct Known Subclasses:
AsyncByteConsumer, AsyncCharConsumer, ZeroCopyConsumer

public abstract class AbstractHttpAsyncResponseConsumer<T>
extends Object
implements HttpAsyncResponseConsumer<T>


Constructor Summary
AbstractHttpAsyncResponseConsumer()
           
 
Method Summary
protected abstract  T buildResult()
           
 void cancel()
           
 void consumeContent(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl)
           
 void failed(Exception ex)
           
 Exception getException()
           
 T getResult()
           
protected abstract  void onCleanup()
           
protected abstract  void onContentReceived(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl)
           
protected abstract  void onResponseReceived(HttpResponse response)
           
 void responseCompleted()
           
 void responseReceived(HttpResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHttpAsyncResponseConsumer

public AbstractHttpAsyncResponseConsumer()
Method Detail

onResponseReceived

protected abstract void onResponseReceived(HttpResponse response)

onContentReceived

protected abstract void onContentReceived(org.apache.http.nio.ContentDecoder decoder,
                                          org.apache.http.nio.IOControl ioctrl)
                                   throws IOException
Throws:
IOException

onCleanup

protected abstract void onCleanup()

buildResult

protected abstract T buildResult()
                          throws Exception
Throws:
Exception

responseReceived

public void responseReceived(HttpResponse response)
                      throws IOException,
                             HttpException
Specified by:
responseReceived in interface HttpAsyncResponseConsumer<T>
Throws:
IOException
HttpException

consumeContent

public void consumeContent(org.apache.http.nio.ContentDecoder decoder,
                           org.apache.http.nio.IOControl ioctrl)
                    throws IOException
Specified by:
consumeContent in interface HttpAsyncResponseConsumer<T>
Throws:
IOException

responseCompleted

public void responseCompleted()
Specified by:
responseCompleted in interface HttpAsyncResponseConsumer<T>

cancel

public void cancel()
Specified by:
cancel in interface HttpAsyncResponseConsumer<T>

failed

public void failed(Exception ex)
Specified by:
failed in interface HttpAsyncResponseConsumer<T>

getException

public Exception getException()
Specified by:
getException in interface HttpAsyncResponseConsumer<T>

getResult

public T getResult()
Specified by:
getResult in interface HttpAsyncResponseConsumer<T>


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.