sunlabs.brazil.filter

Class UrlMapFilter

public class UrlMapFilter extends Object implements Filter

Filter to Map url's from any proxied content. The {@link MultiProxyHandler} is used to virtually mount other web sites into the local document root. In the process, it rewrites all the local url's found in the proxied content to point to the locally mounted version.

This filter examimes content derived from non-proxied sources for absolute url's to proxied sites, and rewrites them to point to the virtual mount point on the local machine instead of directly to the mounted site.

Version: 2.2

Author: Stephen Uhler

Method Summary
byte[]filter(Request request, MimeHeaders headers, byte[] content)
Rewrite all absolute links, if there are any left
booleaninit(Server server, String prefix)
booleanrespond(Request request)
This is the request object before the content was fetched
booleanshouldFilter(Request request, MimeHeaders headers)
Only filter text documents if the MultiProxyHandler was called

Method Detail

filter

public byte[] filter(Request request, MimeHeaders headers, byte[] content)
Rewrite all absolute links, if there are any left

init

public boolean init(Server server, String prefix)

respond

public boolean respond(Request request)
This is the request object before the content was fetched

shouldFilter

public boolean shouldFilter(Request request, MimeHeaders headers)
Only filter text documents if the MultiProxyHandler was called