org.apache.tomcat.util
Class PrefixMapper

java.lang.Object
  extended byorg.apache.tomcat.util.PrefixMapper

public class PrefixMapper
extends java.lang.Object

Prefix and exact mapping alghoritm. XXX finish factoring out the creation of the map ( right now direct field access is used, since the code was just cut out from SimpleMapper). XXX make sure the code is useable as a general path mapper - or at least a bridge can be created between SimpleMapper and a patern matcher like the one in XPath

Author:
costin@costin.dnt.ro

Constructor Summary
PrefixMapper()
           
 
Method Summary
 void addExactMapping(java.lang.String host, java.lang.String path, java.lang.Object target)
           
 void addMapping(java.lang.String host, java.lang.String path, java.lang.Object target)
           
 java.lang.Object getLongestPrefixMatch(MessageBytes hostMB, MessageBytes pathMB)
          Match a prefix rule - /foo/bar/index.html/abc
 void removeAllMappings(java.lang.String host, java.lang.String path)
          Remove all mappings matching path
 void setMapCache(boolean v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrefixMapper

public PrefixMapper()
Method Detail

setMapCache

public void setMapCache(boolean v)

removeAllMappings

public void removeAllMappings(java.lang.String host,
                              java.lang.String path)
Remove all mappings matching path


addMapping

public void addMapping(java.lang.String host,
                       java.lang.String path,
                       java.lang.Object target)

addExactMapping

public void addExactMapping(java.lang.String host,
                            java.lang.String path,
                            java.lang.Object target)

getLongestPrefixMatch

public java.lang.Object getLongestPrefixMatch(MessageBytes hostMB,
                                              MessageBytes pathMB)
Match a prefix rule - /foo/bar/index.html/abc



Copyright ? 2001 Apache Software Foundation. All Rights Reserved.