org.apache.catalina
Interface Mapper

All Known Implementing Classes:
FastEngineMapper, StandardContextMapper, StandardEngineMapper, StandardHostMapper

public interface Mapper

Interface defining methods that a parent Container may implement to select a subordinate Container to process a particular Request, optionally modifying the properties of the Request to reflect the selections made.

A typical Container may be associated with a single Mapper that processes all requests to that Container, or a Mapper per request protocol that allows the same Container to support multiple protocols at once.

Version:
$Revision: 466595 $ $Date: 2006-10-21 23:24:41 +0100 (Sat, 21 Oct 2006) $
Author:
Craig R. McClanahan

Method Summary
 Container getContainer()
          Return the Container with which this Mapper is associated.
 java.lang.String getProtocol()
          Return the protocol for which this Mapper is responsible.
 Container map(Request request, boolean update)
          Return the child Container that should be used to process this Request, based upon its characteristics.
 void setContainer(Container container)
          Set the Container with which this Mapper is associated.
 void setProtocol(java.lang.String protocol)
          Set the protocol for which this Mapper is responsible.
 

Method Detail

getContainer

public Container getContainer()
Return the Container with which this Mapper is associated.


setContainer

public void setContainer(Container container)
Set the Container with which this Mapper is associated.

Parameters:
container - The newly associated Container
Throws:
java.lang.IllegalArgumentException - if this Container is not acceptable to this Mapper

getProtocol

public java.lang.String getProtocol()
Return the protocol for which this Mapper is responsible.


setProtocol

public void setProtocol(java.lang.String protocol)
Set the protocol for which this Mapper is responsible.

Parameters:
protocol - The newly associated protocol

map

public Container map(Request request,
                     boolean update)
Return the child Container that should be used to process this Request, based upon its characteristics. If no such child Container can be identified, return null instead.

Parameters:
request - Request being processed
update - Update the Request to reflect the mapping selection?


Copyright 2000-2002 Apache Software Foundation. All Rights Reserved.