    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.

##

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

##

GZIPFilter()

##

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

##

ATTR_MIME_TYPES

     protected static int ATTR_MIME_TYPES

  Attribute index - List of MIME type that we can compress

types

     protected MimeType types[]

  The set of MIME types we are allowed to compress.

##

GZIPFilter

     public GZIPFilter()

##

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

getMimeTypes

     public synchronized MimeType[] getMimeTypes()

  Get the set of MIME types to match:

  Returns:
    An array of MimeType instances.

outgoingFilter

     public ReplyInterface outgoingFilter(RequestInterface req,
                                          ReplyInterface rep) throws ProtocolException

  Simplified API to the outgoing filter metho.

  Overrides:
    outgoingFilter in class ResourceFilter

    All Packages  Class Hierarchy  This Package  Previous  Next  Index