Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tomcat.util
Class PrefixMapper

    java.lang.Object
      org.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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Apache Software Foundation. All Rights Reserved.