Package org.apache.catalina.valves.rewrite

# Class RandomizedTextRewriteMap

java.lang.Object
org.apache.catalina.valves.rewrite.RandomizedTextRewriteMap

All Implemented Interfaces:
  `RewriteMap`

public class RandomizedTextRewriteMap extends Object implements RewriteMap
Implement a map for the txt: and rnd: mod_rewrite capabilities.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static final StringManager`
`sm`

## Constructor Summary

Constructors
Constructor
Description
`RandomizedTextRewriteMap(String txtFilePath, boolean useRandom)`
Create a map from a text file according to the mod_rewrite syntax.

## Method Summary

Modifier and Type
Method
Description
`String`
`lookup(String key)`
`String`
`setParameters(String params)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### sm

protected static final StringManager sm

## Constructor Details

### RandomizedTextRewriteMap

public RandomizedTextRewriteMap(String txtFilePath, boolean useRandom)
Create a map from a text file according to the mod_rewrite syntax.

Parameters:
  `txtFilePath` - the text file path
  `useRandom` - if the map should produce random results

## Method Details

### setParameters

public String setParameters(String params)

Specified by:
  `setParameters` in interface `RewriteMap`

### lookup

public String lookup(String key)

Specified by:
  `lookup` in interface `RewriteMap`