Class HttpFilter

  extended by
All Implemented Interfaces:
Direct Known Subclasses:
HttpRequestFilter, HttpResponseFilter

public abstract class HttpFilter
extends Object
implements StreamFilter

Base class for HttpRequestFilter and HttpResponseFilter.

Constructor Summary
HttpFilter(boolean decode)
Method Summary
protected abstract  void completed()
 void invoke(Stream stream)
          Invoke the filter.
 boolean isComplete()
 boolean isReadOnly()
          Determine whether this filter is read-only.
protected abstract  String processFirstLine(String firstList)
protected abstract  void processHeaders(Headers headers)
 void setContentFilterFactory(ContentFilterFactory contentFilterFactory)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public HttpFilter(boolean decode)
Method Detail


public void setContentFilterFactory(ContentFilterFactory contentFilterFactory)


public boolean isComplete()


public boolean isReadOnly()
Description copied from interface: StreamFilter
Determine whether this filter is read-only. A read-only filter will not modify any data in the stream and exclusively use the skip operation to advance in the stream. The information provided by this method may be used to optimize processing of the stream.

Specified by:
isReadOnly in interface StreamFilter
true if this filter is read-only


public void invoke(Stream stream)
Description copied from interface: StreamFilter
Invoke the filter. This method is called by Pipeline when data is available for processing. The implementation can modify the stream by discarding bytes from the stream and inserting new data. If it doesn't wish to modify the stream, it should skip the relevant parts, so that it will be processed by the next filter in the pipeline.

An implementation is not required to process (skip or discard) all the data available on each invocation. If after the invocation of this method Stream.available() is non zero, the remaining (unprocessed) data will be available again during the next invocation of the filter.

Specified by:
invoke in interface StreamFilter
stream - the stream to process


protected abstract String processFirstLine(String firstList)


protected abstract void processHeaders(Headers headers)


protected abstract void completed()

Copyright © The Apache Software Foundation. All Rights Reserved.