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

java.lang.Object
  extended by org.apache.http.nio.client.methods.AbstractHttpAsyncResponseConsumer<T>
      extended by org.apache.http.nio.client.methods.ZeroCopyConsumer<T>
All Implemented Interfaces:
HttpAsyncResponseConsumer<T>

public abstract class ZeroCopyConsumer<T>
extends AbstractHttpAsyncResponseConsumer<T>


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

Constructor Detail

ZeroCopyConsumer

public ZeroCopyConsumer(File file)
Method Detail

onResponseReceived

protected void onResponseReceived(HttpResponse response)
Specified by:
onResponseReceived in class AbstractHttpAsyncResponseConsumer<T>

onContentReceived

protected void onContentReceived(org.apache.http.nio.ContentDecoder decoder,
                                 org.apache.http.nio.IOControl ioctrl)
                          throws IOException
Specified by:
onContentReceived in class AbstractHttpAsyncResponseConsumer<T>
Throws:
IOException

process

protected abstract T process(HttpResponse response,
                             File file)
                      throws Exception
Throws:
Exception

buildResult

protected T buildResult()
                 throws Exception
Specified by:
buildResult in class AbstractHttpAsyncResponseConsumer<T>
Throws:
Exception

onCleanup

protected void onCleanup()
Specified by:
onCleanup in class AbstractHttpAsyncResponseConsumer<T>


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