org.apache.http.impl.nio.codecs
Class AbstractContentDecoder

java.lang.Object
  extended by org.apache.http.impl.nio.codecs.AbstractContentDecoder
All Implemented Interfaces:
ContentDecoder
Direct Known Subclasses:
ChunkDecoder, IdentityDecoder, LengthDelimitedDecoder

public abstract class AbstractContentDecoder
extends Object
implements ContentDecoder

Abstract ContentDecoder that serves as a base for all content decoder implementations.

Since:
4.0

Field Summary
protected  SessionInputBuffer buffer
           
protected  ReadableByteChannel channel
           
protected  boolean completed
           
protected  HttpTransportMetricsImpl metrics
           
 
Constructor Summary
AbstractContentDecoder(ReadableByteChannel channel, SessionInputBuffer buffer, HttpTransportMetricsImpl metrics)
          Creates an instance of this class.
 
Method Summary
 boolean isCompleted()
          Returns true if the entity has been received in its entirety.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.http.nio.ContentDecoder
read
 

Field Detail

channel

protected final ReadableByteChannel channel

buffer

protected final SessionInputBuffer buffer

metrics

protected final HttpTransportMetricsImpl metrics

completed

protected boolean completed
Constructor Detail

AbstractContentDecoder

public AbstractContentDecoder(ReadableByteChannel channel,
                              SessionInputBuffer buffer,
                              HttpTransportMetricsImpl metrics)
Creates an instance of this class.

Parameters:
channel - the source channel.
buffer - the session input buffer that can be used to store session data for intermediate processing.
metrics - Transport metrics of the underlying HTTP transport.
Method Detail

isCompleted

public boolean isCompleted()
Description copied from interface: ContentDecoder
Returns true if the entity has been received in its entirety.

Specified by:
isCompleted in interface ContentDecoder
Returns:
true if all the content has been consumed, false otherwise.


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