All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.filters.GZIPFilter

java.lang.Object
   |
   +----w3c.tools.store.AttributeHolder
           |
           +----w3c.tools.store.Resource
                   |
                   +----w3c.tools.store.ResourceFrame
                           |
                           +----w3c.jigsaw.resources.ResourceFilter
                                   |
                                   +----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 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(Request, Reply)
Simplified API to the outgoing filter metho.
 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 Resource
 o getMimeTypes
 public synchronized MimeType[] getMimeTypes()
Get the set of MIME types to match:

Returns:
An array of MimeType instances.
 o outgoingFilter
 public Reply outgoingFilter(Request request,
                             Reply reply) throws HTTPException
Simplified API to the outgoing filter metho.

Overrides:
outgoingFilter in class ResourceFilter

All Packages  Class Hierarchy  This Package  Previous  Next  Index