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

java.lang.Object
  extended by org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<T>
      extended by org.apache.http.nio.client.methods.ZeroCopyConsumer<T>
All Implemented Interfaces:
Closeable, org.apache.http.concurrent.Cancellable, org.apache.http.nio.protocol.HttpAsyncResponseConsumer<T>

public abstract class ZeroCopyConsumer<T>
extends org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<T>


Constructor Summary
ZeroCopyConsumer(File file)
           
 
Method Summary
protected  T buildResult(org.apache.http.protocol.HttpContext context)
           
protected  void onContentReceived(org.apache.http.nio.ContentDecoder decoder, org.apache.http.nio.IOControl ioctrl)
           
protected  void onEntityEnclosed(org.apache.http.HttpEntity entity, org.apache.http.entity.ContentType contentType)
           
protected  void onResponseReceived(org.apache.http.HttpResponse response)
           
protected abstract  T process(org.apache.http.HttpResponse response, File file, org.apache.http.entity.ContentType contentType)
           
protected  void releaseResources()
           
 
Methods inherited from class org.apache.http.nio.protocol.AbstractAsyncResponseConsumer
cancel, close, consumeContent, failed, getException, getResult, isDone, 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(org.apache.http.HttpResponse response)
Specified by:
onResponseReceived in class org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<T>

onEntityEnclosed

protected void onEntityEnclosed(org.apache.http.HttpEntity entity,
                                org.apache.http.entity.ContentType contentType)
                         throws IOException
Specified by:
onEntityEnclosed in class org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<T>
Throws:
IOException

onContentReceived

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

process

protected abstract T process(org.apache.http.HttpResponse response,
                             File file,
                             org.apache.http.entity.ContentType contentType)
                      throws Exception
Throws:
Exception

buildResult

protected T buildResult(org.apache.http.protocol.HttpContext context)
                 throws Exception
Specified by:
buildResult in class org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<T>
Throws:
Exception

releaseResources

protected void releaseResources()
Specified by:
releaseResources in class org.apache.http.nio.protocol.AbstractAsyncResponseConsumer<T>


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