All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.jigsaw.filters.GZIPFilter

java.lang.Object
   |
   +----org.w3c.tools.resources.AttributeHolder
           |
           +----org.w3c.tools.resources.Resource
                   |
                   +----org.w3c.tools.resources.FramedResource
                           |
                           +----org.w3c.tools.resources.ResourceFrame
                                   |
                                   +----org.w3c.tools.resources.ResourceFilter
                                           |
                                           +----org.w3c.jigsaw.filters.GZIPFilter

public class GZIPFilter
extends ResourceFilter
This filter will compress the content of replies using GZIP. Compression is done on the fly. This assumes that you're really on a slow link, where you have lots of CPU, but not much bandwidth.

A nifty usage for that filter, is to plug it on top of a org.w3c.jigsaw.proxy.ProxyDirectory, in which case it will compress the data when it flies out of the proxy.


Variable Index

 o ATTR_MIME_TYPES
Attribute index - List of MIME type that we can compress
 o types
The set of MIME types we are allowed to compress.

Constructor Index

 o GZIPFilter()

Method Index

 o getMimeTypes()
Get the set of MIME types to match:
 o outgoingFilter(RequestInterface, ReplyInterface)
 o setValue(int, Object)
Catch the setting of mime types to compress.

Variables

 o ATTR_MIME_TYPES
 protected static int ATTR_MIME_TYPES
Attribute index - List of MIME type that we can compress

 o types
 protected MimeType types[]
The set of MIME types we are allowed to compress.

Constructors

 o GZIPFilter
 public GZIPFilter()

Methods

 o setValue
 public void setValue(int idx,
                      Object value)
Catch the setting of mime types to compress.

Parameters:
idx - The attribute being set.
val - The new attribute value.
Overrides:
setValue in class ResourceFrame
 o getMimeTypes
 public synchronized MimeType[] getMimeTypes()
Get the set of MIME types to match:

Returns:
An array of MimeType instances.
 o outgoingFilter
 public ReplyInterface outgoingFilter(RequestInterface req,
                                      ReplyInterface rep) throws ProtocolException
Parameters:
request - The original request.
reply - It's original reply.
Returns:
A Reply instance, or null if processing should continue normally.
Throws: ProtocolException
If processing should be interrupted, because an abnormal situation occured.
Overrides:
outgoingFilter in class ResourceFilter

All Packages  Class Hierarchy  This Package  Previous  Next  Index